Kernel killing varnish process due to out-of-memory issue

Events happening in the community are now at Drupal community events on www.drupal.org.
ISPTraderChris's picture

We're having an issue on our Mercury installation where Varnish will unexpectedly and require a manual restart -- this is obviously a pretty big deal given that our site effectively goes down until it is remedied. A look at the syslog reveals the following:

Feb 14 02:17:06 ip-xx-xx-xx-xx kernel: Out of Memory: Kill process 4493 (vshd) score 356911 and children.
Feb 14 02:17:06 ip-xx-xx-xx-xx kernel: Out of memory: Killed process 4493 nishd).

What is the best way to prevent this from happening? I would much rather Varnish dump it's cache than lose the process all-together.

Comments

RAM ?

julien's picture

How much RAM did you assigned to varnish in varnish config file DAEMON OPTS ?
It's recommended to use 25% of the available RAM.

Stock Mercury Config

ISPTraderChris's picture

We are using the stock Mercury configuration for Varnish - we have not modified the settings relating to RAM allocation. The site is hosted on an Amazon EC2 'Small' Virtual Server. I'm not sure this is an issue that relates to the amount of memory allocated, however. I really don't think it is appropriate for the kernel to kill the Varnish process unless there is some sort of memory leak (possible?).

You might want to

vacilando's picture

You might want to double-check the values for your virtual machine in /etc/mercury/server_tuneables -- see http://groups.drupal.org/node/70258


---
Tomáš J. Fülöpp
http://twitter.com/vacilandois