Apache THINKS it has many open processes.
According to the Apache server-status page, my web-server has a large
number of processes open and this number slowly increases until it
reaches 'MaxClients' and then clients will be locked out.
Most of these processes are marked with
'W' - sending reply or 'K' Keepalive on the server-status page.
ps shows only about ten to fifteen
apache processes - the number that I would expect.
Now for the interesting part of this problem:
If the Apache server was started by hand, as root, or from
/etc/rc.d/rc.local during system start, the problem does NOT
occur. However if the Apache server is started by cron this
problem occurs.
I do not think it is an environment variable problem. When
starting Apache by hand I became root using each of the following
and the problem did NOT occur:
su
su -
su root
I also wrote a script to kill -SIGTERM Apache and then restart it and
included almost all of my environment variables. This script worked
without the problem
when executed by hand -- the problem occurred when executing
this script from crontab. Here it is, without the environment variables:
#!/bin/sh
# apache-restart
/bin/kill -SIGTERM `cat /usr/local/apache/logs/httpd.pid`
/bin/sleep 2
/usr/local/apache/httpd -f /usr/local/apache/conf/httpd.conf
What is different about starting/stopping a process using crontab
compared to doing it from a terminal session?
(I need to be able to stop and start Apache from cron to
perform log file clean-up etc. This problem also occurs if I use
Red Hat's logrotate system)
Any help or suggestions would be appreciated.
Here is the system information:
Linux 2.0.33 (Red Hat 5.0 + patches) on Intel Pentum II
glibc-2.0.7-7
apache 1.2.6 (not from rpm)
modules not in apache package: fast-cgi 2.0.14
Thanks
Richard
--
PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject.