Linux – Avoiding memory full -> swap full -> crash

linuxmemoryPHPserver-crashesweb-server

I'm experiencing an issue when sometimes the memory gets 100% full, and the swap file also, and the server becomes non-responsive and has to be restarted (causing also problems in database). This is what Cacti shows:

Physical Memory
Swap File

The server is running a web-app (database + apache) and during that specific moment didn't experience any ir-regular traffic or usage. This scenario happened twice in the last week. What can cause this? How can I resolve the issue?

Best Answer

you can clear a cache of linux machine and pu it into a crontab entry to run in regular interval.

Related Topic