| Author |
ClientAbortException - when do multiple request at same time
|
stshiva raaj
Greenhorn
Joined: Sep 23, 2008
Posts: 8
|
|
When i do simultaneous http request(monkey clicks) is made on the web application i am getting following exception like
Jul 9, 2012 11:05:23 PM org.apache.catalina.core.StandardContextValve throwable
WARNING: Exception Processing ErrorPage[exceptionType=org.apache.jasper.JasperException, location=/jsp/content/utils/error.jsp]
ClientAbortException: java.net.SocketException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:333)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:299)
Cause : The warning log basically means that the connection to the client browser is aborted before the response is fully transferred. It is a harmless warning as it can be due to transient network problems or the browser aborts/refreshes the page before it loaded.
Is there any specific configuration in tomcat(sever side) to solve the problem? Please help me
|
 |
Sabarish Venkat
Ranch Hand
Joined: Jan 18, 2012
Posts: 133
|
|
|
To my point of view am understanding that you are trying to send multiple requests on a shared resource. In such case You have to make the servlets synchronized , So try to synchronize your threads before sending it to container.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
Hey! I am not a monkey! I just have spastic fingers. Also a jumpy nerve in my shoulder that can do a lot worse than just double-click, alas!
HTTP requests are serviced asynchronously and independently. There's no real way for the webapp server to objectively determine whether those 2 overlapping requests are legitimate or not. In fact, the requests won't even overlap initially, since (usually!) one comes in first, then the "monkey click" arrives a few milliseconds afterwards.
You can safely ignore the error message, and as I said, it's not really anything you can do anything about.
On the other hand, the application should be making allowances for possibly servicing the request twice, because that could potentially cause trouble. Especially when payments are being made.
The usual way of "handling" that is to warn people no to click more than once, but that's lazy and sloppy and doesn't take into account that people have been conditioned to double-click to do things or that they may have hair-trigger reflexes, like me.
You can try to reduce that problem by adding JavaScript on the client page, but there are limits to how well that works. What I recommend is that critical requests carry a token so that if the same request appears at the server twice, the duplicate token is recognized and processing adjusted accordingly. Effective use of database transactions is usually a critical part of this process.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
stshiva raaj
Greenhorn
Joined: Sep 23, 2008
Posts: 8
|
|
|
Thanks for your reply. ... My thought is request is committed while flush the response i made another one request. Even though i synchronize the request(queue the request), while render the response i am getting exception. Typical example is session, I am have different context with same session id. When i do many click in different context session id is same but session values is getting changed.
|
 |
 |
|
|
subject: ClientAbortException - when do multiple request at same time
|
|
|