Apache restarts frequently: Caught SIGTERM, shutting down

Created:

2016-11-16 13:04:22 UTC

Modified:

2017-08-16 16:09:27 UTC

2

Was this article helpful?


Have more questions?

Submit a request

Apache restarts frequently: Caught SIGTERM, shutting down

Applicable to:

  • Plesk for Linux

Symptoms

Apache error log has lots of messages like below:

[notice] caught SIGTERM, shutting down

Or:

[mpm_event:notice] [pid 665:tid 140662910175360] AH00492: caught SIGWINCH, shutting down gracefully

Cause

This is expected behaviour that Apache is being restarted to apply configuration changes. Every time when any PHP setting for a domain was changed or anything else, Apache will be restarted to apply changes.

When Apache graceful restart is enabled Apache will NOT be restarted every time when hosting settings is changed through the Plesk web interface. By default, Plesk does not use Apache graceful restart for applying new settings.

The interval defines a minimal gap between two consequent restarts (in seconds) is called "Apache Restart Interval". You can find the apache_restart_interval parameter in psa.misc table:

mysql> SELECT * FROM misc WHERE param LIKE '%_apache%';
+---------------------------+------+
| param | val |
+---------------------------+------+
| restart_apache_gracefully | true |
| restart_apache_interval | 600 |
+---------------------------+------+
2 rows in set (0.00 sec)

Graceful restart is done any time Plesk makes an update to the Apache configuration. Please note that a graceful restart is not the same as a full Apache restart, it just reloads the configuration, which should not affect the functioning of your sites.

To enable:

mysql> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'true');

To disable:

mysql> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'false');
Note: this case is valid only when information messages are shown and Apache keeps running without downtime.

Additional Information

http://httpd.apache.org/docs/2.2/stopping.html#graceful

Have more questions? Submit a request
Please sign in to leave a comment.