Bug 85 - HANDLER THREAD PROBLEM: java.net.SocketException: socket closed: Bad file number BugRat Report#53
Summary: HANDLER THREAD PROBLEM: java.net.SocketException: socket closed: Bad file num...
Status: RESOLVED WONTFIX
Alias: None
Product: Tomcat 3
Classification: Unclassified
Component: Connectors (show other bugs)
Version: 3.2.1 Final
Hardware: All All
: P1 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-08-30 17:36 UTC by Bill Ren
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomcat Developers Mailing List 2000-08-30 17:36:33 UTC
I was running a load test with Apache(1.3.12)/Tomcat (3.1, 3.2 beta2): Apache -> mod_jserv -> Tomcat. Tomcat is serving a simple servlet (HelloWorld). This is on Solaris 2.7, with Sun's JVM (build 1.3.0-beta). I used a tool call "WEBLOAD" to generate the request load. 

The test ran OK with 1 or 2 users (generating lots of request non-stop). When I increased to 3 or more users, I was getting the follow error (on stdout):

HANDLER THREAD PROBLEM: java.net.SocketException: socket closed: Bad file number
java.net.SocketException: socket closed: Bad file number
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:86)
        at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
        at org.apache.tomcat.service.connector.AJP12RequestAdapter.readNextRequest(Ajp12ConnectionHandler.java:233)
        at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:147)
        at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:403)
        at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)

Comment 1 Marc Saegesser 2001-02-22 19:15:56 UTC
If possible, try mod_jk instead of mod_jserv.
Comment 2 Costin Manolache 2001-04-21 13:02:49 UTC
The bug is probably related with a VM or setup problem ( or even a OS setting ).
This shouldn't happen - it's just a normal read.
My guess is that a "netstat -an" will show a lot of TIME_WAIT threads, and that
can be resolved with some settings in the os ( please don't ask for details :-).
You can try to use mod_jk ( which doesn't create additional threads ).
Comment 3 Costin Manolache 2001-04-21 13:03:24 UTC
As a OS setting problem, will not be fixed in tomcat.