Hi Again,

This is not all Tomcat's fault. I have narrowed it down to JSP's that
actually make a JDBC connection.

For static (.html) files and JSP's that don't connect to a db, the
CLOSE_WAIT problem does NOT seem to occur.

I know that EJB's would be the proper way to access persistent data from
JSP's, but for this particular site I don't have that luxury.

I suspect this problem stems from all connector threads using a single
java.sql.Connection object stored in the app context. If I wanted each
thread to have its own Connection, how could I do that?  If it's OK to use
one Connection object for an entire webapp, then I'll check for bugs in my
JDBC driver...

IMHO, if this is NOT a bug in my JDBC driver, then it probably really is a
problem with Tomcat -- sockets simply shouldn't be left in CLOSE_WAIT by an
application.

Thanks,
-Dan


> -----Original Message-----
> From: Dan Higgins [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, February 01, 2003 4:13 PM
> To: Tomcat-Dev
> Subject: Tomcat 4.0.6 leaving CLOSE_WAIT sockets
>
>
> Hi,
>
> I have a script which can burst any number of async socket
> connections to Tomcat from a remote host. With it, I can get
> every available connector processor thread to become busy at
> once. At that point, Tomcat simply refuses any new socket
> connections at all.
>
> Ok, this is to be expected. But the problem is, ALL the threads
> seem to leave their sockets in the CLOSE_WAIT state, never
> actually closing them. Tomcat then seems to refuse any new
> connections until it is restarted.
>
> This is an issue because I am seeing it on a production server
> with maxProcessors set to 600. It could be a targeted DoS attack,
> or it could just be huge spikes in load at certain times. Either
> way, Tomcat is not faring very well.
>
> This has been driving me batty for about a week now. Any advice or ideas?
>
> (Tomcat 4.0.6, Windows 2000 Server SP3, Sun JDK 1.4.1_01)
>
> -Dan


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to