Question
-
How to enable or disable graceful restart for Apache in Plesk?
-
How to make Apache reload instead of restarting when applying settings in Plesk?
Answer
The graceful restart signal for Apache causes the parent process to advise the children to exit after their current request (or to exit immediately if they're not serving anything).
The parent process re-reads its configuration files and re-opens its log files. As each child dies off the parent replaces it with a child from the new generation of the configuration, which begins serving new requests immediately without causing a full interruption for the Apache web server.
Note: Graceful restart for Apache is enabled by default on all new Plesk Obsidian installations.
-
Go to Tools & Settings > Apache Web Server.
-
Enable/disable the Apache graceful restart option and apply the changes.
-
Connect to the Plesk server via SSH.
-
Run the following command:
-
To enable Apache graceful restart
# plesk bin settings --set restart_apache_gracefully=true
-
To disable Apache graceful restart
# plesk bin settings --set restart_apache_gracefully=false
-
Additional Information
Graceful Restart - Stopping and Restarting Apache HTTP Server - Apache HTTP Server Version 2.4
Optimizing Apache Web Server | Setting Up the Apache Restart Interval | Plesk Obsidian documentation