tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davor Cengija <>
Subject Too many open files on Solaris
Date Wed, 16 Jun 2004 08:59:12 GMT
My application is hitting that 'too many open files' limit on Solaris.

Jun 15, 2004 11:23:01 AM
SEVERE: Endpoint ServerSocket[addr=,port=0,localport=8080]
ignored exception: Too many open files Too many open files
        at Method)
Jun 15, 2004 11:23:01 AM
SEVERE: Caught exception trying to unlock accept on 8080 Too many open files
Jun 15, 2004 11:23:01 AM
WARNING: Reinitializing ServerSocket

I realize that increasing file descriptor limit per process could help a
bit, but my system administrator simply doesn't want to do that (since it
requires restart).

Now, the problem is how to avoid too many open files exception. Any
suggestions regarding Tomcat (or Apache) configuration, coding practice,
some runtime operating system parameters would be greatly appreciated.

Here's my configuration:

Default Solaris 8 (I believe) installation on 2CPU+4GB RAM box. TCP
connection wait timeout (I believe that the correct wording) is decreased
from 240sec to 60sec and that's the only parameter changed on Solaris. 

Tomcat 4.1.30 with j2sdk 1.4.2_04 (server mode) with Apache 2.0 as a proxy.
Every single request goes through Apache which then routes it to Tomcat.
600.000 hits and cca 3GB of data daily, with peaks during working hours, of
course, about 50.000 hits per hour. The delivered content consists mostly
of small images (3-20k) delivered directly from a database (servlet sets
content type etc, img src="/preview?id=123" style)

Application lives about 24hours and then dies with the exception shown
above. As far as I can see, all input- and output- streams are flushed and
closed, at least in my application. Cannot guarantee for the underlining

Somehow I think that I cannot squeeze the application anymore and that we're
hitting tomcat+solaris limit.

Ahm... whoever managed to completelly read this rather long post I hope will
have some suggestions.

Thanks in advance!

Davor Cengija,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message