开发者社区> 问答> 正文

一个项目中,线程dump有点看不懂? 400 报错

一个项目中,线程dump有点看不懂? 400 报错

"pool-1-thread-1" prio=6 tid=0x000000000d15d000 nid=0x838 runnable [0x000000000ddae000] 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.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:158) at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:82) at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:271) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138) at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56) at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259) at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281) at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:257) at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:207) at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273) at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125) at org.apache.http.impl.client.DefaultRequestDirector.createTunnelToTarget(DefaultRequestDirector.java:876) at org.apache.http.impl.client.DefaultRequestDirector.establishRoute(DefaultRequestDirector.java:794) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:614) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:445) at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at utils.HttpClientUtlis.doGet(HttpClientUtlis.java:44) at core.Task.run(Task.java:43) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

Locked ownable synchronizers: - <0x0000000091439d30> (a java.util.concurrent.ThreadPoolExecutor$Worker)

我用线程池做任务处理,每个任务循环的发送get请求,每次运行一段时间所有线程均显示这样,有点不能理解。

展开
收起
爱吃鱼的程序员 2020-05-31 00:29:57 566 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    上下代码吧,这样看应该是线程池连接满了?是不是你的httpget没释放?

    ######我有时候访问远程拒绝了我,就报异常,我捕获后,break,我重写了afterexecute方法,又把runnable添加会线程池
    2020-05-31 00:29:58
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
多IO线程优化版 立即下载
小程序 大世界 立即下载
《15分钟打造你自己的小程序》 立即下载