You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Michael Taft <mi...@earthlink.net> on 2004/12/07 03:51:13 UTC

Socket Closed

Hello -

I keep getting this exception when I am polling more than a few web 
pages at a time: java.net.SocketException: Socket closed.

I'm using Java 1.4.2 (on Mandrake Linux), so it's not a problem with an 
old version of Java.

What are some of the probable / possible causes for this?

Thanks for any pointers.

M.



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Socket Closed

Posted by Michael Becke <be...@u.washington.edu>.
Hello,

> 1) Will setting a longer timeout help cut down on this?

I don't believe so.

> 2) Do I need to program my own retry-handler to recreate/reconnect 
> lost sockets, or is there an HC facility that handles this?

In the event of an exception HttpClient will automatically close the 
connection.  There is no need to create a retry-handler for this 
purpose.

Mike


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Socket Closed

Posted by Michael Taft <mi...@earthlink.net>.
Hi Michael,

Some ignorance-based questions. Feel free to ignore.
1) Will setting a longer timeout help cut down on this?
2) Do I need to program my own retry-handler to recreate/reconnect lost 
sockets, or is there an HC facility that handles this?
Thanks,
M.


Michael Becke wrote:

> Hi Michael,
> 
> Most likely this is being caused by heavy load on the web server.  
> You'll find a couple of email threads in the HttpClient mail archives 
> that discuss this issue. If you think something else could be the 
> culprit please post some sample code and a wire log to the mailing list. 
> This will help to narrow down the problem (assuming there is one).
> 
> <http://jakarta.apache.org/commons/httpclient/3.0/logging.html>
> 
> Mike
> 
> On Dec 6, 2004, at 9:51 PM, Michael Taft wrote:
> 
>> Hello -
>>
>> I keep getting this exception when I am polling more than a few web 
>> pages at a time: java.net.SocketException: Socket closed.
>>
>> I'm using Java 1.4.2 (on Mandrake Linux), so it's not a problem with 
>> an old version of Java.
>>
>> What are some of the probable / possible causes for this?
>>
>> Thanks for any pointers.
>>
>> M.
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 

-- 
Michael W. Taft
Writer/Editor
4614 Finley Avenue, #3
Los Angeles, CA 90027
(323)663-6042

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Socket Closed

Posted by Michael Becke <be...@u.washington.edu>.
Hi Michael,

Most likely this is being caused by heavy load on the web server.  
You'll find a couple of email threads in the HttpClient mail archives 
that discuss this issue. If you think something else could be the 
culprit please post some sample code and a wire log to the mailing 
list. This will help to narrow down the problem (assuming there is 
one).

<http://jakarta.apache.org/commons/httpclient/3.0/logging.html>

Mike

On Dec 6, 2004, at 9:51 PM, Michael Taft wrote:

> Hello -
>
> I keep getting this exception when I am polling more than a few web 
> pages at a time: java.net.SocketException: Socket closed.
>
> I'm using Java 1.4.2 (on Mandrake Linux), so it's not a problem with 
> an old version of Java.
>
> What are some of the probable / possible causes for this?
>
> Thanks for any pointers.
>
> M.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> httpclient-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org