On Wed, 2013-09-25 at 09:05 +0200, Sebastiano Vigna wrote: > We are running 1000 threads doing downloads using HttpClient 4.3. When we try > to shut down the system, around 40 threads appear to be stuck inside an > HttpClient call (see stack traces). We were expecting that at some point a > timeout would occur, but this doesn't happen. > > Any suggestion? >
Socket timeout is your best friend. Oleg > java version "1.7.0_40" > Java(TM) SE Runtime Environment (build 1.7.0_40-b43) > Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode) > > Ciao, > > seba > > "FetchingThread-901" daemon prio=10 tid=0x00007fadf033d800 nid=0x461e > runnable [0x00007fab9d08f000] > java.lang.Thread.State: RUNNABLE > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:152) > at java.net.SocketInputStream.read(SocketInputStream.java:122) > at > org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136) > at > org.apache.http.impl.io.SessionInputBufferImpl.read(SessionInputBufferImpl.java:195) > at > org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:174) > at > org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:198) > at > org.apache.http.impl.io.ChunkedInputStream.close(ChunkedInputStream.java:287) > at > org.apache.http.impl.execchain.ResponseEntityWrapper.streamClosed(ResponseEntityWrapper.java:120) > at > org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:227) > at > org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:174) > at org.apache.http.util.EntityUtils.consume(EntityUtils.java:88) > at > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:240) > at > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:185) > at it.unimi.di.law.bubing.util.FetchData.fetch(FetchData.java:308) > at > it.unimi.di.law.bubing.frontier.FetchingThread.run(FetchingThread.java:261) > > > "FetchingThread-498" prio=10 tid=0x00007fb424d6f000 nid=0x39e1 runnable > [0x00007fb34cdcc000] > java.lang.Thread.State: RUNNABLE > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:152) > at java.net.SocketInputStream.read(SocketInputStream.java:122) > at > org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136) > at > org.apache.http.impl.io.SessionInputBufferImpl.read(SessionInputBufferImpl.java:195) > at > org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178) > at > org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:200) > at > org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:103) > at > org.apache.http.impl.execchain.ResponseEntityWrapper.streamClosed(ResponseEntityWrapper.java:120) > at > org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:227) > at > org.apache.http.conn.EofSensorInputStream.close(EofSensorInputStream.java:174) > at org.apache.http.util.EntityUtils.consume(EntityUtils.java:88) > at > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:240) > at > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:185) > at it.unimi.di.law.bubing.util.FetchData.fetch(FetchData.java:308) > at > it.unimi.di.law.bubing.frontier.FetchingThread.run(FetchingThread.java:261) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
