• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

httpd is stopping automaticly

C

Claus Lundholm

Guest
Hi

I've got a problem that my httpd is stopping automaticly sometimes -making all sites unreachable. Something is stopping my httpd -but what. I can start the httpd manualy again, and then it can run for weeks before it's stops again.

What can be the problem here?
 
Originally posted by EvolutionCrazy
do you get any error in your

/var/log/httpd/error_log

after it stops?

The only thing i can see is this:

[Fri Jun 17 11:44:40 2005] [error] OpenSSL: error:140760FC:lib(20):func(118):reason(252)
[Fri Jun 17 12:17:12 2005] [notice] SIGUSR1 received. Doing graceful restart
[Fri Jun 17 12:17:13 2005] [warn] module mod_frontpage.c is already added, skipping
[Fri Jun 17 12:17:13 2005] [notice] Apache/1.3.27 (Unix) (Red-Hat/Linux) FrontPage/5.0.2.2623 mod_python/2.7.8 Python/1.5.2 mod_ssl/2.8.12 OpenSSL/0.9.6b PHP/4.3.8 mod_perl/1.26 configured -- resuming normal operations
[Fri Jun 17 12:17:13 2005] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Jun 17 12:17:13 2005] [notice] Accept mutex: sysvsem (Default: sysvsem)

But's it's before i restarted the https myself.
 
I had a similar problem and made the following script that checks the number of httpd related processes and restarts it if it goes out of bounds :

Save it as /etc/httpd/httpdwatch
--------------------------------------------------

#!/bin/sh

#
# Restart HTTPD if fewer than 6 httpd related processes or more than 99 httpd related processes
#
# Use in a cron job run every minute
#
# /etc/httpd/httpdwatch>>/var/log/httpd/watch_log
#
# V 1.01 - May 15, 2005 - E. Vinter / Pages-Web.com
#
#

mn=`date +%M`
if [ $mn -eq 0 ]
then
mn=`date`
echo $mn
fi
CNT=`ps ax | grep -v grep | grep -c httpd`
echo $CNT
if [ $CNT -gt 99 ]
then
CNT=0
fi
if [ $CNT -le 5 ]
then
mn=`date`
echo $mn '- Restarting HTTPD...'
/etc/init.d/httpd restart
fi

--------------------------------------------------
A root cron job launch it every minute.
the log is put in /var/log/httpd/ (automatic log rotation)

/etc/httpd/httpdwatch>>/var/log/httpd/watch_log

To test it, just stop the httpd server either through SSH ( /etc/init.d/httpd stop ) or through the control panel.

The next minute, it should be back, and the event should be properly recorded in the log.

Hope this helps ...
 
Back
Top