Frequent Restarts of Apache and Nginx

Hello, It’s awesome to see such an active community and dev’s <3

I can’t really figure out why I’m seeing so many restarts of my services every few minutes.

NOTE: I’ve redacted pii from the log files.

From system.log:

2024-03-30 09:21:31 v-purge-nginx-cache  'USERNAME' 'example.com'
2024-03-30 09:21:34 v-restart-service  'apache2' ''
2024-03-30 09:21:34 v-restart-service  'nginx' ''
2024-03-30 09:21:34 v-purge-nginx-cache  'USERNAME' 'example.com'
2024-03-30 09:21:53 v-restart-service  'apache2' ''
2024-03-30 09:21:53 v-restart-service  'nginx' ''
2024-03-30 09:21:53 v-purge-nginx-cache  'USERNAME' 'example.com'
2024-03-30 09:22:02 v-restart-service  'apache2' ''
2024-03-30 09:22:02 v-restart-service  'nginx' ''

From NGINX Error.log:

2024/03/30 13:10:39 [crit] 2804829#2804829: unlink() "/var/cache/nginx/example.com/6/f3/2b1b7c5300860fe1cdc42461e35c1f36" failed (2: No such file or directory)
2024/03/30 13:10:47 [crit] 2804829#2804829: unlink() "/var/cache/nginx/example.com/6/be/69d5c485f08a8d223d7e863fe4257be6" failed (2: No such file or directory)
2024/03/30 13:12:37 [crit] 2804829#2804829: unlink() "/var/cache/nginx/example.com/8/c5/c5eed8e3211059267ea563cb39e4fc58" failed (2: No such file or directory)

From Apache error.log:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using my.hostname.com. Set the 'ServerName' directive globally to suppress this message
[Sat Mar 30 09:39:22.449090 2024] [ssl:warn] [pid 2644071:tid 140711834551616] AH01909: 172.104.123.123:443:0 server certificate does NOT include an ID which matches the server name
[Sat Mar 30 09:39:22.449501 2024] [mpm_event:notice] [pid 2644071:tid 140711834551616] AH00489: Apache/2.4.55 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1n configured -- resuming normal operations
[Sat Mar 30 09:39:22.449515 2024] [core:notice] [pid 2644071:tid 140711834551616] AH00094: Command line: '/usr/sbin/apache2'
[Sat Mar 30 12:58:42.706272 2024] [mpm_event:notice] [pid 2644071:tid 140711834551616] AH00493: SIGUSR1 received.  Doing graceful restart

Sorry for the wall of text snippets here, But something is restarting the services via the v-command? - I also have phpfpm, there doesn’t seem to be a log file recently updated in var/log

I am using the wordpress hestia NGINX cache refresh plugin - I’ve also recently added a specific wordpress fail2ban jail that piggybacks on the way the other jails are setup.

I’ve also recently had an OOM error for maria that prevented it from restarting, and thought that was suspicious because there’s gigs of free memory on this VPS.

Any idea what I should look at?

I assume you Wordpress?

v-purge-nginx-cache ‘USERNAME’ ‘example.com

Lets keep it in 1 topic :slight_smile:

1 Like