site getting down every 1-2 hours sharing nginx & httpd status & log

arjch

New member
Joined
Mar 17, 2025
Messages
3
Hi,

My site is getting down after every 1-2 hours I have checked all the services, everything is working fine on service status window. I am using custom build of apache-nginx. The problem only goes on restarting the server. But its a temporary solution.


status nginx.service
nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; preset: disabled)
Active: active (running) since Mon 2025-03-17 13:55:53 CET; 35min ago
Process: 216219 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Process: 216220 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Process: 216522 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
Main PID: 216221 (nginx)
Tasks: 18 (limit: 403712)
Memory: 136.2M
CPU: 10.888s
CGroup: /system.slice/nginx.service
├─216221 "nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf"
├─216526 "nginx: worker process"
├─216527 "nginx: worker process"
├─216528 "nginx: worker process"
├─216529 "nginx: worker process"
├─216530 "nginx: worker process"
├─216531 "nginx: worker process"
├─216532 "nginx: worker process"
├─216533 "nginx: worker process"
├─216534 "nginx: worker process"
├─216535 "nginx: worker process"
├─216536 "nginx: worker process"
├─216537 "nginx: worker process"
├─216538 "nginx: worker process"
├─216539 "nginx: worker process"
├─216540 "nginx: worker process"
├─216541 "nginx: worker process"
└─216542 "nginx: cache manager process"

Mar 17 13:55:53 server-23-88-78-182 systemd[1]: Starting The nginx HTTP and reverse proxy server...
Mar 17 13:55:53 server-23-88-78-182 nginx[216219]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Mar 17 13:55:53 server-23-88-78-182 nginx[216219]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Mar 17 13:55:53 server-23-88-78-182 systemd[1]: Started The nginx HTTP and reverse proxy server.
Mar 17 13:56:02 server-23-88-78-182 systemd[1]: Reloading The nginx HTTP and reverse proxy server...
Mar 17 13:56:02 server-23-88-78-182 systemd[1]: Reloaded The nginx HTTP and reverse proxy server.


systemctl status httpd
httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; preset: disabled)
Active: active (running) since Mon 2025-03-17 13:55:52 CET; 38min ago
Process: 216546 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Main PID: 214858 (httpd)
Status: "Total requests: 2390; Idle/Busy workers 100/0;Requests/sec: 1.03; Bytes served/sec: 2.3KB/sec"
Tasks: 279 (limit: 403712)
Memory: 91.6M
CPU: 3.179s
CGroup: /system.slice/httpd.service
├─214858 /usr/sbin/httpd -DFOREGROUND
├─216862 /usr/sbin/httpd -DFOREGROUND
└─216864 /usr/sbin/httpd -DFOREGROUND

Mar 17 13:55:52 server-23-88-78-182 systemd[1]: Starting The Apache HTTP Server...
Mar 17 13:55:52 server-23-88-78-182 httpd[214858]: AH00558: httpd: Could not reliably determine the server's fully qualified domain>
Mar 17 13:55:52 server-23-88-78-182 systemd[1]: Started The Apache HTTP Server.
Mar 17 13:56:02 server-23-88-78-182 systemd[1]: Reloading The Apache HTTP Server...
Mar 17 13:56:02 server-23-88-78-182 httpd[216546]: AH00558: httpd: Could not reliably determine the server's fully qualified domain>
Mar 17 13:56:02 server-23-88-78-182 systemd[1]: Reloaded The Apache HTTP Server.


httpd error log
[Mon Mar 17 12:30:55.426551 2025] [core:notice] [pid 1288:tid 1288] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Mar 17 12:51:43.106180 2025] [proxy_fcgi:error] [pid 1310:tid 1791] [client 180.178.94.73:0] AH01071: Got error 'Primary script unknown'
[Mon Mar 17 12:51:45.533290 2025] [proxy_fcgi:error] [pid 1310:tid 1825] [client 180.178.94.73:0] AH01071: Got error 'Primary script unknown'
[Mon Mar 17 12:51:46.117804 2025] [proxy_fcgi:error] [pid 1310:tid 1833] [client 180.178.94.73:0] AH01071: Got error 'Primary script unknown'
[Mon Mar 17 13:55:17.105312 2025] [mpm_event:notice] [pid 1288:tid 1288] AH00492: caught SIGWINCH, shutting down gracefully
[Mon Mar 17 13:55:18.155785 2025] [ssl:warn] [pid 207876:tid 207876] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 17 13:55:18.156086 2025] [ssl:warn] [pid 207876:tid 207876] AH01909: www.example.com:8081:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 17 13:55:18.156204 2025] [suexec:notice] [pid 207876:tid 207876] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 23.88.78.182. Set the 'ServerName' directive globally to suppress this message
[Mon Mar 17 13:55:18.162520 2025] [ssl:warn] [pid 207876:tid 207876] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 17 13:55:18.162815 2025] [ssl:warn] [pid 207876:tid 207876] AH01909: www.example.com:8081:0 server certificate does NOT include an ID which matches the server name
[Mon Mar 17 13:55:18.162950 2025] [lbmethod_heartbeat:notice] [pid 207876:tid 207876] AH02282: No slotmem from mod_heartmonitor
[Mon Mar 17 13:55:18.164198 2025] [mpm_event:notice] [pid 207876:tid 207876] AH00489: Apache/2.4.63 (Unix) OpenSSL/3.2.2 configured -- resuming normal operations
[Mon Mar 17 13:55:18.164211 2025] [core:notice] [pid 207876:tid 207876] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Mon Mar 17 13:55:19.211788 2025] [mpm_event:notice] [pid 207876:tid 207876] AH00492: caught SIGWINCH, shutting down gracefully

/etc/hosts
127.0.0.1 localhost.localdomain localhost
23.88.78.182 Alma-9-latest-amd64-base
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
2a01:4f8:2220:17ee::2 Alma-9-latest-amd64-base
23.88.78.182 server-23-88-78-182.da.direct server-23-88-78-182

httpd.conf
added
ServerName localhost



Any help appreciated.
 
Hello,

Any help appreciated.

The lines you've posted do not explain reasons of the issue, as well as they do not prove the issue. Since Nginx and Apache are reloaded together, then it is probably Directadmin restarts them to apply requested changes. You might check logs in /var/log/directadmin/ for other possible clues.
 
directadmin error log only shows this:

2025:03:16-20:26:18: File ./data/users/admin/domains.list has been written to after this process read it. Not going to overwrite it. This read timestamp=1742066738, before-write timestamp=1742153178
 
Probably not related, or at least does not give any clues yet. You will probably need to search through all other logs under /var/log/ for entries around the time of the webservices reload.
 
I have changed the "ServerName to-server-domain" now its been 3 hours without down time, may be that was the issue, dont know no major error was reported in the logs.
 
Back
Top