Every day, at just after 0625, my Java web server application crashes. In the system log, I get something resembling the following:
Jan 20 06:25:09 qswp-portal kernel: [724576.041037] Out of memory: Kill process 21435 (java) score 199 or sacrifice child Jan 20 06:25:09 qswp-portal kernel: [724576.043434] Killed process 21435 (java) total-vm:2266296kB, anon-rss:257212kB, file-rss:6232kB
The application is running on a very small box, just 512MB of RAM (with 1GB swap), and ideally I'd like to keep it that way.
After a bit of searching around, I discovered that the daily cron jobs are scheduled to run at 0625, and this is presumably the cause (i.e. too much going on at once for the box to handle).
Is there anything I can do to prevent this happening - staggering the daily cron jobs perhaps? Is there a particular daily cron job that is likely to be causing this issue?
This is a relatively recent problem, and seems to have only started happening after doing an update (with
apt-get update). Unfortunately, I've only just realised this so I'm not sure exactly which update is likely to be the problem (assuming it's not just a coincidence).
Edit: As requested, here is the output of
free -h under a normal load.
total used free shared buff/cache available Mem: 488M 335M 10M 2.9M 142M 122M Swap: 1.0G 21M 1.0G