Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection reset by peer

 
tanu gulati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
on the login page where user puts in user name and password, when i hit the submit button couple of times quickly without filling userid and password, i get java.net.SocketException. Connection reset by peer.
I am using Tomcat as web server. My hunch is that since Tomcat is not able to handle so many hits, thats why i am getting this error. But i am not sure as to why i am getting this error. If sb could tell me how many hits can tomcat take successfully. and can i configure Tomcat to take more hits ?? if yes where can i do that ?
thanks to all of you in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Connection reset by peer from Java means that the browser closed the connection. This is not a reflection of the number of simultaneous requests that Tomcat can handle.
Bill
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William ,
1.Can U shed some light on browser connection
2.what can make the browser close the connection
3.How can this error be avoided
All ideas are welcomed.
[ May 12, 2002: Message edited by: Gabriel Fox ]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a related post about non-fatal "connection reset by peer" errors in Tomcat 3.x

http://www.coderanch.com/t/81597/Tomcat/Connection-reset-peer-socket-write
 
Manohar Karamballi
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi...
This is the problem we faced. This happened when we are using MVC architecure for our portal.
What happened is when submitted twice requests are sent to same controller and controller is not thread safe.. So shared objects like session objects, Application objects are corrupted and when these corrupoted objects (Usually value beans stored in session/Application)are used in JSP code this exception is thrown..
We resolved this problem by disabling submit button after submission..
One more solution is making servlet and other related components thread safe by implementing SingleThreadModel but this may pose a serious performance problems.
Hope this helps..
Rgds
Manohar
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers guys for the solid info.
Nice reference on connection-reset by peer
i have confirmed it's true nature from the Tomcat
conf directory.
 
tanu gulati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks everybody for ideas and thoughts
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic