I'm calling a php script to run from apache. I'm using the exec function in php to call the script. Once the script ends, httpd is still sitting with 8.9% of memory usage while all other processes complete and go back to 0%. We have no idea why httpd is still sitting there. We use Amazon EC2.

Any ideas?


HTTPD doesn't necessarily release resources when a request is completed. Unlike a call of a one-shot script in response to a request, it keeps processes or threads ready to handle new requests that come in, instead of starting from scratch for every request.

If you want to keep strict control over how much idle capacity HTTPD is sitting on, take a look at MaxSpareServers (if you're on the prefork MPM) or MaxSpareThreads (if you're on worker).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.