I'm running one gcloud g1-small instance with Debian to power one Node server and one Apache server. I use Node Bouncy to redirect http requests to Node or Apache depending on req.headers.host
. Each of my two websites are low-traffic, below 10k accesses a day.
After about two weeks running ininterruptly, both my Apache and Node websites stopped responding. I couldn't connect to the instance via SSH either. After rebooting and examining the logs, I found the following:
/var/log/kern.log:
kernel: [timestamp] TCP: out of memory -- consider tuning tcp_mem
(multiple times)
/var/log/apache2/error.log:
[Timestamp] [core:warn] [pid 573] (105)No buffer space available: AH00056: connect to listener on 0.0.0.0:8001
(multiple times)
There was nothing in my Node log file.
How can I prevent this error from happening again?