You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Francois-Xavier Bonnet (JIRA)" <ji...@apache.org> on 2012/12/17 15:04:15 UTC
[jira] [Created] (HTTPCLIENT-1280) CachingExec catches
SocketTimeoutException silently and closes the backend InputStream
Francois-Xavier Bonnet created HTTPCLIENT-1280:
--------------------------------------------------
Summary: CachingExec catches SocketTimeoutException silently and closes the backend InputStream
Key: HTTPCLIENT-1280
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1280
Project: HttpComponents HttpClient
Issue Type: Bug
Components: Cache
Affects Versions: 4.2.2, 4.2.3, Snapshot
Reporter: Francois-Xavier Bonnet
When a SocketTimeoutException occurs, CachingExec catches and logs it, then closes the Inputstream:
11-12 08:23:18 10010 [qtp907773188-11] WARN org.apache.http.impl.client.cache.CachingHttpClient - Unable to store entries in cache
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:204)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:177)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:201)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:155)
at org.apache.http.impl.client.cache.HeapResourceFactory.generate(HeapResourceFactory.java:54)
at org.apache.http.impl.client.cache.SizeLimitedResponseReader.doConsume(SizeLimitedResponseReader.java:103)
at org.apache.http.impl.client.cache.SizeLimitedResponseReader.readResponse(SizeLimitedResponseReader.java:75)
at org.apache.http.impl.client.cache.BasicHttpCache.cacheAndReturnResponse(BasicHttpCache.java:241)
at org.apache.http.impl.client.cache.CachingHttpClient.handleBackendResponse(CachingHttpClient.java:916)
at org.apache.http.impl.client.cache.CachingHttpClient.callBackend(CachingHttpClient.java:729)
at org.apache.http.impl.client.cache.CachingHttpClient.handleCacheMiss(CachingHttpClient.java:508)
at org.apache.http.impl.client.cache.CachingHttpClient.execute(CachingHttpClient.java:436)
at org.esigate.cache.CacheAdapter$HttpClientWrapper.execute(CacheAdapter.java:123)
Then there is no way for the code to know that a problem occurred and if you try to read the entity you get another Exception:
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
at org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:183)
at org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:140)
at org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:121)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org