You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Carcassone France <ca...@yahoo.com> on 2004/04/06 01:57:41 UTC
mod_jk leaks file handles on apache graceful restart?
Running: Apache 1.3.28 and Tomcat 4.1.24 on Solaris 5.8
mod_jk related lines in httpd.conf:
LoadModule jk_module libexec/mod_jk.so
AddModule mod_jk.c
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLevel info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
Very standard stuff. Initially when httpd starts up, lsof reports 2 fd's for mod_jk.log for every
instance of httpd. Then everytime on subsequent apachectl graceful restart, lsof reports 1 extra
fd for mod_jk.log for each httpd instance. So it's possible to eventually crash httpd with a loop
of apachctl graceful restart. When httpd finally crashed, error_log reports:
[Wed Mar 31 22:01:35 2004] [notice] SIGUSR1 received. Doing graceful restart
[Wed Mar 31 22:01:37 2004] [notice] Web Server configured -- resuming normal operations
[Wed Mar 31 22:01:37 2004] [notice] Accept mutex: fcntl (Default: fcntl)
[Wed Mar 31 22:02:37 2004] [notice] SIGUSR1 received. Doing graceful restart
[Wed Mar 31 22:02:39 2004] [error] (24)Too many open files: Error while opening the workers, jk
will not work
[Wed Mar 31 22:02:39 2004] [error] (24)Too many open files: could not open mime types log file
/httpd/conf/mime.types.
Is there any way to stop mod_jk to chew up file handles? This is necessary for log rotation...
Thanks in advance for your help.
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk leaks file handles on apache graceful restart?
Posted by Paul Mansfield <pa...@psineteurope.com>.
On Wed, 2004-04-07 at 01:41, David Rees wrote:
> Run strings on your binary and grep for 1.2 `strings mod_jk.so | grep
> 1.2`. The other way is to look at the output of mod_status (commonly
> accessible at http://example.com/server-status)
not forgetting to modify apache.conf (or httpd.conf depending) and
enable server-status and server-info functions, and put your IP address
into the allow.
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk leaks file handles on apache graceful restart?
Posted by David Rees <dr...@greenhydrant.com>.
Carcassone France wrote:
> Well, I just extracted 1.2.5 binary from
> jakarta-tomcat-connectors-jk-1.2.5-solaris8-sparc-apache-1.3.28.tar.gz and
> replaced it with my existing mod_jk.so. (BTW, is there anyway to have
> mod_jk out its version number? I didn't see any version info in
> mod_jk.log even with "debug" log level". After stopping and restarting
> httpd, my test script shows that it's still chewing up fd's on httpd
> restart:
Run strings on your binary and grep for 1.2 `strings mod_jk.so | grep
1.2`. The other way is to look at the output of mod_status (commonly
accessible at http://example.com/server-status)
On Apache 2.0.49, mod_jk does not leak any file descriptors on graceful or
restarts.
-Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk leaks file handles on apache graceful restart?
Posted by Carcassone France <ca...@yahoo.com>.
Well, I just extracted 1.2.5 binary from
jakarta-tomcat-connectors-jk-1.2.5-solaris8-sparc-apache-1.3.28.tar.gz and replaced it with my
existing mod_jk.so. (BTW, is there anyway to have mod_jk out its version number? I didn't see
any version info in mod_jk.log even with "debug" log level". After stopping and restarting httpd,
my test script shows that it's still chewing up fd's on httpd restart:
#!/bin/sh
i=0
while true
do
if [ -r /usr/local/bin/httpd/logs/httpd.pid ]; then
i=`expr $i + 1`
FILES=`/usr/local/bin/lsof | grep mod_jk.log | wc -l`
kill -USR1 `cat /usr/local/bin/logs/httpd.pid`
STATUS=$?
echo "`date`: i=$i; kill status=$STATUS; lsof mod_jk.log =$FILES"
if [ $STATUS -eq 0 ]; then
sleep 10
else
echo "kill failed"
exit 1
fi
else
echo "httpd not running"
fi
done
script output:
Tue Apr 6 16:23:18 PDT 2004: i=1; kill status=0; lsof mod_jk.log = 42
Tue Apr 6 16:23:30 PDT 2004: i=2; kill status=0; lsof mod_jk.log = 63
Tue Apr 6 16:23:42 PDT 2004: i=3; kill status=0; lsof mod_jk.log = 84
Tue Apr 6 16:23:55 PDT 2004: i=4; kill status=0; lsof mod_jk.log = 105
Tue Apr 6 16:24:07 PDT 2004: i=5; kill status=0; lsof mod_jk.log = 126
httpd instance count = 21 (1 parent + 20 children)
on init, mod_jk.log count = 42 => 2 * 21
subsequent graceful restart adds 21 more each time!
Eventually httpd crashed with too many open files!
--- Bill Barker <wb...@wilshire.com> wrote:
> I had thought that this was fixed in mod_jk 1.2.5.
>
> "Carcassone France" <ca...@yahoo.com> wrote in message
> news:20040405235741.10549.qmail@web20604.mail.yahoo.com...
> > Running: Apache 1.3.28 and Tomcat 4.1.24 on Solaris 5.8
> >
> > mod_jk related lines in httpd.conf:
> >
> > LoadModule jk_module libexec/mod_jk.so
> > AddModule mod_jk.c
> > JkWorkersFile /etc/httpd/conf/workers.properties
> > JkLogFile /var/log/httpd/mod_jk.log
> > JkLogLevel info
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> >
> > Very standard stuff. Initially when httpd starts up, lsof reports 2 fd's
> for mod_jk.log for every
> > instance of httpd. Then everytime on subsequent apachectl graceful
> restart, lsof reports 1 extra
> > fd for mod_jk.log for each httpd instance. So it's possible to eventually
> crash httpd with a loop
> > of apachctl graceful restart. When httpd finally crashed, error_log
> reports:
> >
> > [Wed Mar 31 22:01:35 2004] [notice] SIGUSR1 received. Doing graceful
> restart
> > [Wed Mar 31 22:01:37 2004] [notice] Web Server configured -- resuming
> normal operations
> > [Wed Mar 31 22:01:37 2004] [notice] Accept mutex: fcntl (Default: fcntl)
> > [Wed Mar 31 22:02:37 2004] [notice] SIGUSR1 received. Doing graceful
> restart
> > [Wed Mar 31 22:02:39 2004] [error] (24)Too many open files: Error while
> opening the workers, jk
> > will not work
> > [Wed Mar 31 22:02:39 2004] [error] (24)Too many open files: could not open
> mime types log file
> > /httpd/conf/mime.types.
> >
> > Is there any way to stop mod_jk to chew up file handles? This is
> necessary for log rotation...
> >
> > Thanks in advance for your help.
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Small Business $15K Web Design Giveaway
> > http://promotions.yahoo.com/design_giveaway/
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: mod_jk leaks file handles on apache graceful restart?
Posted by Bill Barker <wb...@wilshire.com>.
I had thought that this was fixed in mod_jk 1.2.5.
"Carcassone France" <ca...@yahoo.com> wrote in message
news:20040405235741.10549.qmail@web20604.mail.yahoo.com...
> Running: Apache 1.3.28 and Tomcat 4.1.24 on Solaris 5.8
>
> mod_jk related lines in httpd.conf:
>
> LoadModule jk_module libexec/mod_jk.so
> AddModule mod_jk.c
> JkWorkersFile /etc/httpd/conf/workers.properties
> JkLogFile /var/log/httpd/mod_jk.log
> JkLogLevel info
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
>
> Very standard stuff. Initially when httpd starts up, lsof reports 2 fd's
for mod_jk.log for every
> instance of httpd. Then everytime on subsequent apachectl graceful
restart, lsof reports 1 extra
> fd for mod_jk.log for each httpd instance. So it's possible to eventually
crash httpd with a loop
> of apachctl graceful restart. When httpd finally crashed, error_log
reports:
>
> [Wed Mar 31 22:01:35 2004] [notice] SIGUSR1 received. Doing graceful
restart
> [Wed Mar 31 22:01:37 2004] [notice] Web Server configured -- resuming
normal operations
> [Wed Mar 31 22:01:37 2004] [notice] Accept mutex: fcntl (Default: fcntl)
> [Wed Mar 31 22:02:37 2004] [notice] SIGUSR1 received. Doing graceful
restart
> [Wed Mar 31 22:02:39 2004] [error] (24)Too many open files: Error while
opening the workers, jk
> will not work
> [Wed Mar 31 22:02:39 2004] [error] (24)Too many open files: could not open
mime types log file
> /httpd/conf/mime.types.
>
> Is there any way to stop mod_jk to chew up file handles? This is
necessary for log rotation...
>
> Thanks in advance for your help.
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org