• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Issue Speed of restart apache

sebgonzes

Silver Pleskian
Hello

In sometime, our client claim about 502 error page, this error is produced by an restart/reload of apache, when there is an new hosting created or an php change version in control panel.

The restart of apache is a bit slow, can be about 10s or 20s sometime and give error to our client.
Is there some way to speed apache restart? Nginx have not this problem... always able to restart in 1 second...

Os cloudlinux7, plesk 17.5.3 (it's not an direct cp problem)
 
In case of problems you want to try and switch the MPM to prefork instead of event.
With the "event" MPM we encountered apache2 restart problems on any system and apache2 version we ever used so far.
 
In case of problems you want to try and switch the MPM to prefork instead of event.
With the "event" MPM we encountered apache2 restart problems on any system and apache2 version we ever used so far.

I'd suggest Worker over Prefork. Prefork uses high memory in comparison to Worker and each child process handles one connection at a time, versus Worker where each child runs many threads. Event is good for high loads.
 
Worker does not necessarily support the built-in OS vendor PHP, so Webmail might not work when it is set to "Worker". Else I can only say that @Mark Muyskens ' suggestion to enable graceful restarts is most likely the best possible solution.

Edit: Forgot to mention that on a system with many domains that are using PHP-FPM, the restart can take several minutes. It can depend on how long it takes to stop PHP-FPM children processes and restart them.
 
Back
Top