hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Natarajan_Va...@emc.com>
Subject RE: connection reset issue
Date Mon, 11 Jan 2010 17:47:03 GMT
Yes. The server receives request and sends response back to client. Both
threads on client side run file for a while before hitting this problem.
This seems to be kind of timing issue. For example, if I enable HC wire
log, runs fine no connection reset issue.

Thanks
Valli

-----Original Message-----
From: Brooks, Kenneth S [mailto:kenneth.s.brooks@chase.com] 
Sent: Monday, January 11, 2010 7:05 AM
To: HttpClient User Discussion
Subject: RE: connection reset issue

Just curious, can you tell from your server logs if the server received
both requests and processed them?



-----Original Message-----
From: Natarajan_Valli@emc.com [mailto:Natarajan_Valli@emc.com] 
Sent: Monday, January 11, 2010 1:01 AM
To: httpclient-users@hc.apache.org
Subject: connection reset issue

There are 2 threads send requests to a server simultaneously. After a
while one of the threads (same thread every time) closes the connection
and throws following exception and other thread seems to run fine and
server is alive too.

 

I'm using version 3.0.1. I could not send context log.....

 

Caused by: java.net.SocketException: Connection reset

                at
java.net.SocketInputStream.read(SocketInputStream.java:168)

                at
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)

                at
java.io.BufferedInputStream.read(BufferedInputStream.java:235)

                at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:77)

                at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:105)

                at
org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.jav
a:1115)

                at
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpCon
nectionAdapter.readLine(MultiThreadedHttpConnectionManager.java:1373)

                at
org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBa
se.java:1832)

                at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase
.java:1590)

                at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:995)

                at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe
thodDirector.java:397)

                at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)

                at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)

                at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
24)

 

Use MultiThreadedHttpConnectionManager

 

        m_multiThreadedHttpConnectionManager = new
MultiThreadedHttpConnectionManager();

 
m_multiThreadedHttpConnectionManager.getParams().setDefaultMaxConnection
sPerHost(10);

 
m_multiThreadedHttpConnectionManager.getParams().setMaxTotalConnections(
50);

        m_client = new HttpClient(m_multiThreadedHttpConnectionManager);

 

Both threads execute PostMethod.

 

Has anyone else experience this problem? Any idea what might cause this
issue? 

 

Thanks

Valli

 

 

Thanks

Valli

 

 

This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
 If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

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



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


Mime
View raw message