I have flask
/python2.7
/apache2
/mod_wsgi
app and periodically I can see the following lines in apache log and my application gets restarted:
[mpm_event:notice] AH00493: SIGUSR1 received. Doing graceful restart
[wsgi:error] Joining threads
I know that such "graceful restart" can happen if there was segfault, but as far as I can see there was no segfault in my case (no corresponding lines in log before line 'doing graceful restart'). Or maybe such event wasn't logged... anyway I suspect this is apache2 issue because mpm_event
is apache2 internal entity (docs).
So my questions are:
1) How to check what's wrong in my case?
2) If this is default behavior (restarting if there is no activity for example) rather than issue - how to configure it and where?
Thanks!
This is because your system has logrotate
setup to handle log rotation for Apache. It will send a graceful restart signal to Apache to have it reload while it swaps out the log files.
If this isn't desirable, don't have logrotate
do that and use Apache's own mechanism for log file rotation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With