Apache Log Rotate related segfault

Summary : If Apache2 service is reloaded/restarted multiple times too quickly it segfaults.

Two of the servers I have installed Virtualmin on have this issue where Apache stops working on a sunday/monday exactly at 6:25 AM UTC.
Please check the attached screenshot.
I believe those two Log Rotate entries are the reason as they conflict on 1 day in a week causing two restarts that leads to a segfault error.

Log:

[Mon Jul 23 06:25:11.179069 2018] [mpm_event:notice] [pid 13976:tid 140393561941888] AH00493: SIGUSR1 received.  Doing graceful restart
[Mon Jul 23 06:25:11.339922 2018] [core:notice] [pid 13976] AH00060: seg fault or similar nasty error detected in the parent process



Ref:
https://talk.plesk.com/threads/apache-reload-graceful-restart-causes-apa...
https://serverfault.com/questions/627521/why-is-logrotate-causing-apache...

Please also check the related issue, can these two entries be combined or a delay added between the two?

Status: 
Closed (duplicate)

Comments

Status: Active » Closed (duplicate)

Howdy -- there should already be a delay, it's 5 seconds according to your screenshot (the "sleep 5" you see in there)... however, you could always try increasing that delay to see if that helps.

There is an existing bug report about this issue with a number of suggestions, you can see that here:

https://www.virtualmin.com/node/22024

In the above link are some examples of how to use a single log rotation block rather than individual blocks for each domain, that change works for a lot of people.

Since we do have an existing report about this same issue, I'm going to go ahead and close this, but feel free to post on the bug report above.