Could not fork autovacuum worker process


(charles) #1

new install on DO with 1GB and failed to complete install

saw error message but not sure if this is the reason for the failure:
could not fork autovacuum worker process: Cannot allocate memory

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

I restarted the server and then did sudo ./launcher bootstrap app and it went further but stopped again


"Cannot allocate memory" during setup
(Matt Palmer) #2

We recommend 2GB of RAM these days, but at the very least you’ll want a fairly hefty swap file in order to make a 1GB droplet work.


"Cannot allocate memory" during setup
(charles) #3

DO provider doesn’t recommend enabling swap.

“Doing so can impact the reliability of the underlying hardware for you and your neighbors.”

Hopefully they will not ban me if I do.


(Matt Palmer) #4

We’re yet to hear of a droplet being disabled for running a swap file, and we recommend it for all DO installations – including the ones we do ourselves. If you’re really not keen on having one, you’ll want to upgrade to at least a 4GB RAM droplet, because database maintenance and site rebuilds consume a significant amount of RAM.


(charles) #5

Wow Discourse requirement is higher.

Will have to use swap since 2GB is $20 and 4GB is $40.

Thanks!


(Matt Palmer) #6

Yes, modern applications do tend to have higher resource usage, and databases want a lot of memory to get good performance. If you know what you’re doing, and don’t mind your site running like molasses in the arctic, you can pare the memory requirements right down, but we don’t give a howto on that because we prefer people to have a good experience.


(Jeff Atwood) #7

The swap file is really only used during rebuilds, anyway. The “swappiness” is set very low.


(Jay Pfaffman) #8

Did you use ./discourse-setup? It would have set up swap for you.

I hadn’t noticed that. So should the install guide be updated?

Should discourse-setup provide some kind of warning for people with 1GB?

For my “small community”, which has been mostly idle for the past several weeks, memory usage looks like this:

$ free -h
             total       used       free     shared    buffers     cached
Mem:          994M       910M        83M        90M       3.5M       162M
-/+ buffers/cache:       744M       249M
Swap:         2.0G       875M       1.1G

Which does look like it’s using some swap.


(Kane York) #9

Yeah, you’re going to want to bump that up to 2GB. That’s a lot of used swap (for Discourse).