We have set-up apache to restart every day at 6am just to help out with memory loads on the server, this is configured in cron with systemctl restart httpd
and it works well.
However we have noticed recently that when httpd restarts it is also performing a load of requests in our application, I wander if it is caching requests (perhaps requests that fail) and on restart it is running through those requests and causing things to happen in our application. But then that doesn't sound right so not really sure what could be going on.
Apache is sitting behind a Nginx proxy so not sure what affects anything, we are using Cent OS 7 and Apache 2.4 that was installed with yum I believe.
Any assistance appreciated. Thanks
Update
Our application is a bit of an ancient behemoth in places so a mem leak could be possible, Something we wanted to know should apache free up memory once its finished and also free up the number of processes it has? At the moment at say 4am when no one is using the system the httpd process is consuming about 8GB of memory and 254 processes. It seems a bit excessive when no one is using it?
We did recently upgrade our server (which is a VM) to give it more RAM as it was continuously crashing and we want to try and prevent that in the future.
Thanks for the responses