PDA

View Full Version : Apache 2.2 sometimes restart failed


kalaj
01-18-2008, 07:29 PM
Sometimes my server's service down, I found that the system has only one httpd process, Apache was half-dead.

Sometimes I restart Apache manually, I got these error:

root@cph:~# /etc/init.d/httpd restart
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Stopping httpd:
Remaining processes: 20328
Starting httpd:

(98)Address already in use: make_sock: could not bind to address 218.240.14.21:80
no listening sockets available, shutting down
Unable to open logs

And I find "[Fri Jan 18 09:05:04 2008] [notice] caught SIGTERM, shutting down" in error log, no other error messages.

It seems /etc/init.d/httpd has a problem, it can't kill all httpd processes when restart Apache sometimes.

Any help, Thanks a lot :(

andyreed
01-18-2008, 07:56 PM
Sometimes my server's service down, I found that the system has only one httpd process, Apache was half-dead.

Sometimes I restart Apache manually, I got these error:



And I find "[Fri Jan 18 09:05:04 2008] [notice] caught SIGTERM, shutting down" in error log, no other error messages.It is likely that a module or library is corrupted causing this problem. I suggest you re-compile Apache. See if that helps!

kalaj
01-18-2008, 09:26 PM
Thanks, I'' have a try.

BTW, I notice that my previous httpd init script there was no "Remaining processes: " message when restarting.

kalaj
01-19-2008, 04:19 AM
Recompiled Apache, the problem still occur :mad:

andyreed
01-19-2008, 11:11 AM
Recompiled Apache, the problem still occur :mad:Stop Apache and killall remaining processes and start it again
killall httpd
killall -9 httpd

Then restart:
/sbin/service httpd restart

Make sure your partitions did not exceed their allocated quota by running this command:
df -Th

In addition, check out these threads: http://www.directadmin.com/forum/showthread.php?t=2326&page=2
http://www.directadmin.com/forum/showthread.php?t=17004&page=9
http://www.directadmin.com/forum/showthread.php?t=16779

If none of the above helped, I suggest you seek professional help.

kalaj
01-20-2008, 05:11 AM
Thank you andyreed. I'll give some try.