- Plesk for Linux
How to enable/disable graceful restart for Apache in Plesk?
How to make Apache reload instead of restarting when applying settings in Plesk?
By default, Plesk does not use graceful restart for Apache when applying new settings. As a result, Apache restarts every time when hosting settings are changed via Plesk interface. It leads to a short downtime of the websites hosted on this server.
Warning: Because Apache graceful restart is unstable and can crash Apache or cause issues, it is recommended to increase Apache Restart Interval in Plesk at Tools & Settings > Apache Web Server. In this case, if you set Apache restart interval to 1800 (30 min), new settings will be applied after 30 minutes.
To enable Apache graceful restart, set the
restart_apache_gracefully parameter to
true in the
Connect to the Plesk server via SSH.
For security reasons, create a dump of the Plesk database:
# plesk db dump psa > psa_backup.$(date +%F_%R).sql
Run the following command:
To enable Apache graceful restart
# plesk db "INSERT INTO psa.misc VALUES ('restart_apache_gracefully', 'true')"
restart_apache_gracefullyalready exists (the command above fails with "Duplicate entry") in the
# plesk db "UPDATE psa.misc SET val='true' WHERE param = 'restart_apache_gracefully'"
To disable Apache graceful restart
# plesk db "UPDATE psa.misc SET val='false' WHERE param = 'restart_apache_gracefully'"
Check Apache graceful restart status with the command:
# plesk db "select * from psa.misc WHERE param = 'restart_apache_gracefully'"
where true - Apache graceful restart is enabled, false - disabled.