You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Bruce Keats <br...@gmail.com> on 2006/02/01 17:20:28 UTC
Tomcat 5.5.12 CGI leaking file descriptors.
We are running a tomcat server 5.5.12 under Fedora Core 3 with Java
1.5..0update 5 and we have enabled CGI. We noticed that the number of
file
descriptors over time was increasing to the point where the VM runs out of
file descriptors. We think we have found a file descriptor leak in the CGI
code because when we execute the following script, the file descriptors held
by the Java VM increases by 1.
#!/bin/sh
echo "Content-type: text/html"
echo
echo "<html>"
echo "<body>"
date
echo "</body>"
echo "</html>"
If we run this script in a loop, eventually tomcat runs out of file
descriptors and CGI starts returning HTTP 500 errors. After some more time,
it looks like the compactor runs and cleans something up. The number of
file descriptors drops back down to an acceptable level.
Has anyone else seen similar problems? Does anyone have a fix?
Does anyone know where I can find the JAVA code that handle the CGI? I will
need to fix this one way or the other.
Bruce
Re: Tomcat 5.5.12 CGI leaking file descriptors.
Posted by Mark Thomas <ma...@apache.org>.
Bruce Keats wrote:
> We are running a tomcat server 5.5.12 under Fedora Core 3 with Java
> 1.5..0update 5 and we have enabled CGI. We noticed that the number of
> file
> descriptors over time was increasing to the point where the VM runs out of
> file descriptors. We think we have found a file descriptor leak in the CGI
> code
<snip>
> Has anyone else seen similar problems? Does anyone have a fix?
Not that I am aware of (but check bugzilla). No.
>
> Does anyone know where I can find the JAVA code that handle the CGI? I will
> need to fix this one way or the other.
http://svn.apache.org/repos/asf/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
Best to open a bugzilla item for this and add your patch (in diff -u
format) when you have one.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org