Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

ClientAbortException - when do multiple request at same time

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Ranch Hand
Posts: 136
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 25459
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
stshiva raaj
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
I didn't say it. I'm just telling you what this tiny ad said.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic