tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: file descriptor (unix socket) leak with NIO handler
Date Sun, 08 Jan 2012 15:14:09 GMT
On 07/01/2012 07:23, Arijit Ganguly wrote:
> At my anticipated connection rates (100/second), we observe the application
> to leak about 150 file handles (corresponding to Unix sockets) each day.

That is a pretty small percentage of connections that results in a leak.
That suggests this could be tricky to reproduce and track down.

> I did some investigation on the issue by connecting to the application via
> JMX. It seems like this increase in Unix socket file handles is due to
> improperly closed connections

Almost certainly.

> since I am also able to reproduce the same
> unix socket leak by invoking stop() on the HTTP Connector via JMX. Just
> before stopping the connector my application had 4000 open connections
> (lsof showed these as 4000 IPv6 file handles). On invoking stop() via JMX,
> I the number of IPv6 file went down to about 70, while the number of unix
> socket file handles went up by 4000. It seems that these incorrectly closed
> connections then incarnate as Unix socket handles.

The stop() issue should be easier to reproduce and easier to fix. Please
create a bugzilla issue for this particular problem.

> I have tried different versions of tomcat 6.0.32, 6.0.35, 7.0.21 and
> tomcat7.0.23 – they all have this issue. My application is using the
> default configuration of the NIO Connector. I dont think Comet or SendFile
> are being used. Furthermore, no unix sockets show up when I use Blocking IO
> (default HTTP handler).

Thanks, that helps.

> I would appreciate the help of the community in addressing this issue.

We can take a look at the NIO code but finding leaks like this purely
from code inspection is tricky to say the least.

Anything you can do to increase the rate of the leak and/or to provide a
test case that demonstrates the issue would be useful.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message