Apache crashes at the same time every day

debruijnemedia

New member
Joined
Dec 9, 2014
Messages
4
Hi there,

I have a problem with my server. Every day at 00:10 my Apache crashes and i need to manually reboot to resolve the issues. When i wake up in the morning all my websites give 500 erros.


I run a Centos 6.6 server with this specifications:


Code:
Latest version of DirectAdmin: 1.45.0
Installed version of DirectAdmin: 

DirectAdmin  to 1.45.0 update is available.

Latest version of Apache: 2.2.26
Installed version of Apache: 2.2.26

Latest version of PCRE: 8.20
Installed version of PCRE: 8.20

Latest version of FreeType: 2.5.3
Installed version of FreeType: 2.5.3

Latest version of dovecot: 2.2.12
Installed version of dovecot: 2.2.12

Latest version of PHP (CLI): 5.3.28
Installed version of PHP (CLI): 5.3.28

Latest version of RoundCube webmail: 0.9.5
Installed version of RoundCube webmail: 0.9.5

Latest version of phpMyAdmin: 3.5.8.2-all-languages
Installed version of phpMyAdmin: 3.5.8.2-all-languages

From my Apache error log:

Code:
[Tue Dec 09 00:10:01 2014] [notice] SIGHUP received.  Attempting to restart
[Tue Dec 09 00:10:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:10:02 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 09 00:10:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:10:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:10:02 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 09 00:10:02 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 09 00:10:02 2014] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 PHP/5.3.28 configured -- resuming normal operations
[Tue Dec 09 00:12:01 2014] [notice] caught SIGTERM, shutting down
[Tue Dec 09 00:12:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:12:02 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 09 00:12:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:12:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:12:02 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 09 00:12:02 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 09 00:12:02 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 09 00:12:03 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:12:03 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 09 00:12:03 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:12:03 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 09 00:12:03 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 09 00:12:03 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 09 00:12:03 2014] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 PHP/5.3.28 configured -- resuming normal operations

From my cron log:

Code:
Dec  9 00:10:01 vps2 CROND[9070]: (root) CMD (/usr/local/directadmin/dataskq)
Dec  9 00:10:01 vps2 CROND[9071]: (root) CMD (echo 'action=tally&value=all' >> /usr/local/directadmin/data/task.queue)
Dec  9 00:10:01 vps2 CROND[9072]: (root) CMD (/usr/lib64/sa/sa1 1 1)

I have no idea what the problem is. Your help would be much appreciated.
 
Hello,

Make sure you've got enough free RAM on your server, and OOM Killer does not kill any PHP/MySQL/Apache processes. Check system logs in /var/log/ for that.

Did you try not to wait till the morning and restart apache immediately after the tally process? Manually? Or with cron?
 
Hi there,

Thanks for your response.

My server has 4096MB Ram and when i look into my process monitor i am using this:

Code:
directadmin	directadmin (pid 1562 3426 3427 3428 3438 3441 )	9.09 MB	Start	Stop	Restart	Reload
dovecot	dovecot (pid 1306 )	50.3 MB	Start	Stop	Restart	
exim	exim (pid 1577 )	1.36 MB	Start	Stop	Restart	Reload
httpd	httpd (pid 1647 1786 1788 1789 1790 2154 2205 2474 2705 2706 2707 )	232.1 MB	Start	Stop	Restart	Reload
mysqld	mysqld (pid 1572 )	56.3 MB	Start	Stop	Restart	Reload
named	named (pid 1857 )	12.9 MB	Start	Stop	Restart	Reload
proftpd	proftpd (pid 1881 )	1.98 MB	Start	Stop	Restart	
sshd	sshd (pid 1360 3386 )	4.68 MB	Start	Stop	Restart	Reload

The problem occurs at 00:10 and i tried resetting today after the tally process, that works fine as well.
Restarting of process HTTPD solves the problem. I have to do that manually every day.

Ofcourse i could make a cron job for the process to restart every day at 00:11. If i can't find any solution that would be a nice way to solve the issues. But i'd rather find a solution for the crashing itself.

About OOM killer, i should see that in my System Messages log right?
I have this line in my Messages log a few minutes before the crash:

Code:
Dec 10 00:07:49 vps2 named[1846]: client 58.243.1.254#38574: query (cache) '067.cz/ANY/IN' denied
Dec 10 00:07:49 vps2 named[1846]: client 58.243.1.254#38574: query (cache) '067.cz/ANY/IN' denied

It doesn't ring a bell for me.
 
Hi there,

Thanks for your response. I've set it up as stated in the link U sent me.
I will get back to you tomorrow morning. Let's see how it holds after the tally process.

Or is there a way to simulate tally process so i can test this?

Greets,
Mark
 
You can start the tally in debug mode using: /usr/local/directadmin/datasqk d2000

Remember to fill the task.queue file with the needed tally (check from crontabs what tally you need)

Regards
 
Unfortionately this did not solve the problem.
Maybe the error log from tonight will give you some insight:

Code:
[Tue Dec 23 00:10:03 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 00:10:03 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 00:10:03 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 00:10:03 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 00:10:03 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 23 00:10:03 2014] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 PHP/5.3.28 configured -- resuming normal operations
[Tue Dec 23 00:11:01 2014] [notice] Graceful restart requested, doing restart
Warning: DocumentRoot [/home/admin/domains/dar-clan.com/public_html] does not exist
Warning: DocumentRoot [/home/admin/domains/dar-clan.com/private_html] does not exist
Warning: DocumentRoot [/home/admin/domains/dpsclan.eu/public_html] does not exist
Warning: DocumentRoot [/home/admin/domains/dpsclan.eu/private_html] does not exist
Warning: DocumentRoot [/home/admin/domains/dpsclan.eu/public_html/forum] does not exist
Warning: DocumentRoot [/home/admin/domains/dpsclan.eu/private_html/forum] does not exist
Warning: DocumentRoot [/home/admin/domains/uitvaartsd.nl/public_html] does not exist
Warning: DocumentRoot [/home/admin/domains/uitvaartsd.nl/private_html] does not exist
[Tue Dec 23 00:11:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 00:11:02 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 00:11:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 00:11:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 00:11:02 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 00:11:02 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 23 00:11:02 2014] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 PHP/5.3.28 configured -- resuming normal operations
[Tue Dec 23 03:24:01 2014] [error] [client 125.64.35.67] File does not exist: /var/www/html/r
[Tue Dec 23 03:24:01 2014] [error] [client 125.64.35.67] File does not exist: /var/www/html/404.shtml
[Tue Dec 23 03:24:01 2014] [error] [client 125.64.35.67] File does not exist: /home/admin/domains/sharedip/r
[Tue Dec 23 03:24:01 2014] [error] [client 125.64.35.67] File does not exist: /home/admin/domains/sharedip/404.shtml
[Tue Dec 23 04:01:56 2014] [error] [client 125.64.35.67] File does not exist: /home/admin/domains/sharedip/400.shtml
[Tue Dec 23 04:16:03 2014] [error] [client 125.64.35.68] File does not exist: /var/www/html/r
[Tue Dec 23 04:16:03 2014] [error] [client 125.64.35.68] File does not exist: /var/www/html/404.shtml
[Tue Dec 23 04:16:03 2014] [error] [client 125.64.35.68] File does not exist: /home/admin/domains/sharedip/r
[Tue Dec 23 04:16:03 2014] [error] [client 125.64.35.68] File does not exist: /home/admin/domains/sharedip/404.shtml
[Tue Dec 23 04:25:32 2014] [error] [client 125.64.35.67] File does not exist: /var/www/html/400.shtml
[Tue Dec 23 04:55:46 2014] [error] [client 125.64.35.68] File does not exist: /home/admin/domains/sharedip/400.shtml
[Tue Dec 23 05:21:23 2014] [error] [client 125.64.35.68] File does not exist: /var/www/html/400.shtml
[Tue Dec 23 07:21:11 2014] [error] Hostname 149.210.175.247 provided via SNI and hostname localhost provided via HTTP are different
[Tue Dec 23 07:21:11 2014] [error] Hostname 149.210.175.247 provided via SNI and hostname localhost provided via HTTP are different
[Tue Dec 23 07:53:00 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 07:53:00 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 07:53:00 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 07:53:00 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 07:53:00 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 07:53:00 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 23 07:53:00 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Dec 23 07:53:01 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 07:53:01 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 07:53:01 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 07:53:01 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Dec 23 07:53:01 2014] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Tue Dec 23 07:53:01 2014] [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Tue Dec 23 07:53:01 2014] [notice] Apache/2.2.26 (Unix) mod_ssl/2.2.26 OpenSSL/1.0.1e-fips DAV/2 PHP/5.3.28 configured -- resuming normal operations
 
By the way what do the logs say about reasons of 500 error?
Have you ever had the same issue after manual restart/reload during normal operating time?
 
Back
Top