tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Kaufman <WKauf...@viquity.com>
Subject RE: IOException and Tomcat hanging
Date Mon, 02 Jul 2001 17:32:24 GMT
> I've got random java.sql.SQLException: Io exception: Socket closed error
> in my web application, which uses Tomcat 3.2.2 and struts. It happens
> only when a link is clicked without the page fully loaded. I don't get
> any exception while the page is fully loaded.

That exception tells you that,... the user clicked on another link, before
the page was completely loaded.  Really.  The page couldn't be delivered
because a new page was selected.

What you do with that exception is up to you.  In most cases, though, you
probably want to ignore it, and let it percolate back up to the servlet
engine.  After all, there's no one asking for the page anymore--what would
you do with the output?

If you're using the servlet call to do something unrelated to page
generation (e.g., to start a service or pre-load data), you may want to move
that work off to a separate thread, so it doesn't get interrupted by I/O
failures.


                                        -- Bill K. 
-----Original Message-----
From: Xiaoyu Zhang [mailto:xyzhang@cisco.com]
Sent: Monday, July 02, 2001 10:16 AM
To: tomcat-user@jakarta.apache.org
Subject: IOException and Tomcat hanging 




Hi,
I've got random java.sql.SQLException: Io exception: Socket closed error in
my web application, which uses Tomcat 3.2.2 and struts. It happens only when
a link is clicked without the page fully loaded. I don't get any exception
while the page is fully loaded.

The exception caught in the application is : SQLExcpetion: Io Exceptoin:
socket closed
The exception at tomcat console is : ContextManager: SocketException reading
request, ignored - java.net.SocketException: Connection reset by peer

Did someone have similar case before ?

Thanks. 
Xiaoyu



attached:
Error message in tomcat console:
ContextManager: SocketException reading request, ignored -
java.net.SocketException: Connection reset by peer 
at java.net.PlainSocketImpl.socketAvailable(Native Method) 
at java.net.PlainSocketImpl.available(PlainSocketImpl.java:451) 
at java.net.SocketInputStream.available(SocketInputStream.java:137) 
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:217) 
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) 
at java.lang.Thread.run(Thread.java:484)


Error message our application caught:
com.cisco.tte.rims.model.DatabaseErrorException: java.sql.SQLException: Io
exception: Socket closed 
at com.cisco.tte.rims.model.Workspace.getAttributeById(Workspace.java:2809) 
at
com.cisco.tte.rims.actions.ViewWorkspaceConfigAction.handleAction(ViewWorksp
aceConfigAction.java:174) 
at com.cisco.tte.rims.actions.BaseAction.perform(BaseAction.java:174) 
at
org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja
va:1726) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1536) 
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) 
at org.apache.tomcat.core.Handler.service(Handler.java:287) 
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) 
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7) 
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) 
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:213) 
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)

at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) 
at java.lang.Thread.run(Thread.java:484)

Mime
View raw message