• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.net.ConnectException: Connection timed out

 
Deepee Kulkarni
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a script that makes several thousands of http requests to a specific server. This script works for some time and then gives me a connection timeout exception. The exact exception is as follows:
org.apache.commons.httpclient.HttpMethodDirector - I/O Exception (java.net.ConnectException) caught when processing request: Connection timed out.
I have seen a lot of forums for similar exception, but no one talks about the http call initially working and then suddenly failing.
Any help is greatly appreciated.
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe, every server has a limit on the number of concurrent sessions it can handle. Either you may increase the count (thereby increasing the required resources) or you may maintain the maximum number of concurrent sessions currently supported by your server.
Your case may also have been recoginsed as a "Denial Of Service Attack" kind of scenario by the server and further connections refused. ;)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!