We have a web server running a PHP application to serve customers.
- PHP 4
- 3 GB memory
- Apache HTTP server.
As our customer load has increased, we are having server memory issues. Sooner or later, we need to restart the HTTP service to release the memory (probably 5 times a day).
We can tell from top that most of the HTTP processes are fine, only using a little memory, but there are about 3-4 HTTP processes that are taking 80% of the memory and almost zero CPU usage. It looks like dead processes, but they don't release memory until we restart the HTTP service.
We suspect some part of our PHP code isn't working well and causing huge memory usage, then hanging there. Is there a PHP setting somewhere we can set that will terminate the process and free up the memory after, say, 5 minutes idle? This is a short term solution, we will have to find out what code is doing this -- hard to find, though.