Pergunta

I have a linode 512 mb ram with ubuntu 10.04 64 bits with a rails app + mongodb + nginx + unicorn.

I use sunspot solr gem and delayed_job gem

When I make a new deploy with delayed job:

after "deploy:restart",   "delayed_job:start"

The server go very very slow and very very bad.

If I write in terminal:

free -m

I get:

             total       used       free     shared    buffers     cached
Mem:           487        481          5          0          1         16
-/+ buffers/cache:        463         23
Swap:          255        226         29

I get errors like Errno::ENOMEM (Cannot allocate memory... on my rails log.

My question is if I need upgrade my linode or change to dedicated server to work with delayed_job gem

I have been taking a look to http://www.hetzner.de/en/ for dedicated server.

If I need upgrade my linode, How much memory do I need to run properly delayed_job gem?

Delayed job in my local ubuntu machine with 4GB ram is working fine.

Thank you very much

Foi útil?

Solução

Yes you need to increase RAM. Unicorn and delayed jobs will result in at least 2 running Rails processes, and 3 during a deploy.

Your Rails instance is probably 200 MB each. I think 512 MB is fine for Rails deployments without background processes, but with them I recommend 1024.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top