Java应用程序中的挂起问题

问题描述:

下面是线程转储sneapet。运行一些日子后,应用程序正在变得不稳 怀疑Java应用程序中的挂起问题

  • java.net.SocketInputStream.socketRead0,也许这是根本的问题?

附加到进程ID 14226,请稍候... 调试成功连接。 检测到服务器编译器。 JVM版本为25.121-b13 死锁检测:

找不到死锁。

Thread 25940: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Interpreted frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Compiled frame) 
- java.lang.Thread.run() @bci=11, line=745 (Compiled frame) 


Thread 15960: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Compiled frame) 


Thread 15959: (state = BLOCKED) 
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise) 
- java.net.SocketInputStream.socketRead(java.io.FileDescriptor, byte[], int, int, int) @bci=8, line=116 (Compiled frame) 
- java.net.SocketInputStream.read(byte[], int, int, int) @bci=117, line=171 (Compiled frame) 
- java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=141 (Compiled frame) 
- org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer() @bci=71, line=160 (Compiled frame) 
- org.apache.http.impl.io.SocketInputBuffer.fillBuffer() @bci=1, line=84 (Compiled frame) 
- org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(org.apache.http.util.CharArrayBuffer) @bci=130, line=273 (Compiled frame) 
- org.apache.http.impl.conn.LoggingSessionInputBuffer.readLine(org.apache.http.util.CharArrayBuffer) @bci=5, line=122 (Compiled frame) 
- org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(org.apache.http.io.SessionInputBuffer) @bci=16, line=140 (Compiled frame) 
- org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(org.apache.http.io.SessionInputBuffer) @bci=2, line=57 (Compiled frame) 
- org.apache.http.impl.io.AbstractMessageParser.parse() @bci=38, line=261 (Compiled frame) 
- org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader() @bci=8, line=283 (Compiled frame) 
- org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader() @bci=1, line=259 (Compiled frame) 
- org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader() @bci=6, line=209 (Compiled frame) 
- org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) @bci=41, line=272 (Compiled frame) 
- org.apache.http.protocol.HttpRequestExecutor.execute(org.apache.http.HttpRequest, org.apache.http.HttpClientConnection, org.apache.http.protocol.HttpContext) @bci=39, line=124 (Compiled frame) 
- org.apache.http.impl.client.DefaultRequestDirector.tryExecute(org.apache.http.impl.client.RoutedRequest, org.apache.http.protocol.HttpContext) @bci=198, line=686 (Compiled frame) 
- org.apache.http.impl.client.DefaultRequestDirector.execute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) @bci=578, line=488 (Compiled frame) 
- org.apache.http.impl.client.AbstractHttpClient.doExecute(org.apache.http.HttpHost, org.apache.http.HttpRequest, org.apache.http.protocol.HttpContext) @bci=362, line=884 (Compiled frame) 
- org.apache.http.impl.client.CloseableHttpClient.execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) @bci=14, line=82 (Compiled frame) 
- org.apache.http.impl.client.CloseableHttpClient.execute(org.apache.http.client.methods.HttpUriRequest, org.apache.http.protocol.HttpContext) @bci=3, line=55 (Compiled frame) 
- org.springframework.http.client.HttpComponentsClientHttpRequest.executeInternal(org.springframework.http.HttpHeaders, byte[]) @bci=56, line=89 (Compiled frame) 
- org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(org.springframework.http.HttpHeaders) @bci=27, line=48 (Compiled frame) 
- org.springframework.http.client.AbstractClientHttpRequest.execute() @bci=9, line=53 (Compiled frame) 
- org.springframework.web.client.RestTemplate.doExecute(java.net.URI, org.springframework.http.HttpMethod, org.springframework.web.client.RequestCallback, org.springframework.web.client.ResponseExtractor) @bci=37, line=652 (Compiled frame) 
- org.springframework.web.client.RestTemplate.execute(java.lang.String, org.springframework.http.HttpMethod, org.springframework.web.client.RequestCallback, org.springframework.web.client.ResponseExtractor, java.util.Map) @bci=21, line=621 (Compiled frame) 
- org.springframework.web.client.RestTemplate.exchange(java.lang.String, org.springframework.http.HttpMethod, org.springframework.http.HttpEntity, java.lang.Class, java.util.Map) @bci=26, line=540 (Compiled frame) 
- com.kodiak.couchservice.frameworks.querymgr.workers.KnPutDocWorker.executeRequest() @bci=375, line=159 (Compiled frame) 
- com.kodiak.couchservice.frameworks.querymgr.workers.KnPutDocWorker.run() @bci=37, line=83 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Compiled frame) 


Thread 15507: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15506: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15505: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15504: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(int, long) @bci=139, line=1037 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(int, long) @bci=25, line=1328 (Compiled frame) 
- java.util.concurrent.CountDownLatch.await(long, java.util.concurrent.TimeUnit) @bci=10, line=277 (Compiled frame) 
- com.couchbase.client.java.util.Blocking.blockForSingle(rx.Observable, long, java.util.concurrent.TimeUnit) @bci=32, line=72 (Compiled frame) 
- com.couchbase.client.java.CouchbaseBucket.get(java.lang.String, long, java.util.concurrent.TimeUnit) @bci=17, line=128 (Compiled frame) 
- com.couchbase.client.java.CouchbaseBucket.get(java.lang.String) @bci=9, line=123 (Compiled frame) 
- com.kodiak.microservices.common.couchsdk.KnCBSdkHelper.getDocument(java.lang.String) @bci=9, line=120 (Compiled frame) 
- com.kodiak.microservices.common.task.KnDocumentBaseTask.getDocumentSync() @bci=59, line=175 (Compiled frame) 
- com.kodiak.microservices.location.task.KnLocationHistoryTask.getDocumentSync() @bci=6, line=121 (Compiled frame) 
- com.kodiak.microservices.location.cleintEvents.KnLocationPublishEventTask.processHistoryDoc() @bci=22, line=158 (Compiled frame) 
- com.kodiak.microservices.location.cleintEvents.KnLocationPublishEventTask.intiateLocationDocUpdateTask(com.kodiak.microservices.location.dto.KnLocation) @bci=163, line=124 (Compiled frame) 
- com.kodiak.microservices.location.cleintEvents.KnLocationPublishEventTask.handleUpdateLocationDocument(com.kodiak.microservices.location.dto.KnLocation) @bci=81, line=96 (Compiled frame) 
- com.kodiak.microservices.location.cleintEvents.KnLocationPublishEventTask.run() @bci=232, line=58 (Compiled frame) 
- com.kodiak.AppPlatform.dto.BaseDocuments.<init>() @bci=1, line=13 (Compiled frame) 
- com.kodiak.microservices.common.dto.userNotify.KnUserActivation.<init>() @bci=1, line=12 (Compiled frame) 
- com.kodiak.microservices.location.messaging.KnLocRMQMsgProcessor.run() @bci=557, line=105 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=95, line=1142 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15503: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15502: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15501: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15500: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15499: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15498: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15497: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15496: (state = BLOCKED) 
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise) 
- java.net.SocketInputStream.socketRead(java.io.FileDescriptor, byte[], int, int, int) @bci=8, line=116 (Compiled frame) 
- java.net.SocketInputStream.read(byte[], int, int, int) @bci=117, line=171 (Compiled frame) 
- java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=141 (Compiled frame) 
- java.io.BufferedInputStream.fill() @bci=214, line=246 (Compiled frame) 
- java.io.BufferedInputStream.read() @bci=12, line=265 (Compiled frame) 
- java.io.DataInputStream.readUnsignedByte() @bci=4, line=288 (Compiled frame) 
- com.rabbitmq.client.impl.Frame.readFrom(java.io.DataInputStream) @bci=1, line=91 (Compiled frame) 
- com.rabbitmq.client.impl.SocketFrameHandler.readFrame() @bci=11, line=164 (Compiled frame) 
- com.rabbitmq.client.impl.AMQConnection$MainLoop.run() @bci=17, line=580 (Compiled frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15495: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15494: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15493: (state = BLOCKED) 
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise) 
- java.net.SocketInputStream.socketRead(java.io.FileDescriptor, byte[], int, int, int) @bci=8, line=116 (Compiled frame) 
- java.net.SocketInputStream.read(byte[], int, int, int) @bci=117, line=171 (Compiled frame) 
- java.net.SocketInputStream.read(byte[], int, int) @bci=11, line=141 (Compiled frame) 
- java.io.BufferedInputStream.fill() @bci=214, line=246 (Compiled frame) 
- java.io.BufferedInputStream.read() @bci=12, line=265 (Compiled frame) 
- java.io.DataInputStream.readUnsignedByte() @bci=4, line=288 (Compiled frame) 
- com.rabbitmq.client.impl.Frame.readFrom(java.io.DataInputStream) @bci=1, line=91 (Compiled frame) 
- com.rabbitmq.client.impl.SocketFrameHandler.readFrame() @bci=11, line=164 (Compiled frame) 
- com.rabbitmq.client.impl.AMQConnection$MainLoop.run() @bci=17, line=580 (Compiled frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15492: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15491: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15490: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15489: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long) @bci=20, line=215 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=78, line=2078 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=124, line=1093 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15488: (state = BLOCKED) 
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise) 
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame) 
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2039 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=24, line=1081 (Compiled frame) 
- java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take() @bci=1, line=809 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=149, line=1067 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1127 (Compiled frame) 
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 


Thread 15483: (state = BLOCKED) 
- java.lang.Thread.sleep(long) @bci=0 (Compiled frame; information may be imprecise) 
- com.couchbase.client.deps.io.netty.util.ThreadDeathWatcher$Watcher.run() @bci=19, line=152 (Compiled frame) 
- com.couchbase.client.deps.io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run() @bci=4, line=144 (Interpreted frame) 
- java.lang.Thread.run() @bci=11, line=745 (Interpreted frame) 

Thread 15367: (state = BLOCKED) 
- sun.nio.ch.EPollArrayWrapper.epollWait(long, int, long, int) @bci=0 (Compiled frame; information may be imprecise) 
- sun.nio.ch.EPollArrayWrapper.poll(long) @bci=18, line=269 (Compiled frame) 
- sun.nio.ch.EPollSelectorImpl.doSelect(long) @bci=28, line=93 (Compiled frame) 
- sun.nio.ch.SelectorImpl.lockAndDoSelect(long) @bci=37, line=86 (Compiled frame) 
- sun.nio.ch.SelectorImpl.select(long 

编辑(从意见采取)

读取超时和连接超时我们提供。但是,I/O异常通常会在连接丢失时发生。但在挂起情况下,我们也不会有任何异常。

SchemeRegistry schemeRegistry = new SchemeRegistry(); 
schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory())); 
schemeRegistry.register(new Scheme("https", 443, SSLSocketFactory.getSocketFactory())); 

PoolingClientConnectionManager httpConnectionManager = new PoolingClientConnectionManager(schemeRegistry); 
httpConnectionManager.setMaxTotal(500); 
httpConnectionManager.setDefaultMaxPerRoute(200); 

DefaultHt‌​tpClient httpClient = new DefaultHttpClient(httpConnectionManager); 
httpClient.getParams().setParameter(ClientPNames.ALLOW_CIRCU‌​LAR_REDIRECTS, true); 

requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient); 
requestFactory.setConnectTimeout(30000); 
requestFactory.setReadTimeout(30000); 

knlogger.info(methodname,"Created requestFactory"); 
+1

请问您可以格式化文本 –

虽然它是不可能告诉这肯定的是与信息,我们现在,我可以承担应用程序“挂起”一个可能的原因量发生:

您正在使用阻塞I/O。代码正在等待下一个数据包在几个线程(那些在socketRead0)。这可能是正常的,但很可能是网络连接丢失(例如路由器上的网络中断等)。由于传输层完全是底层操作系统的责任,因此应用程序可能不会长时间收到关于连接中断的通知(例如,直到操作系统在Keepalive配置时多次发送Keepalive消息才能接收消息),或直到应用本身尝试发送通过同一个套接字的数据。

为了防止这种情况发生,你应该考虑以下解决方案之一:

  • 设置读取超时(默认情况下JVM类被配置为“无超时”)和超时
  • 启用保持后重新连接活着连接(如果可能)。检测到连接丢失的速度取决于操作系统中的协议设置。具有交换心跳的系统 - 例如,错过3次心跳意味着连接丢失。

无论如何,您应该准备好处理连接异常并尝试重新连接。

+0

阅读超时和我们提供的连接超时。但是,I/O异常通常会在连接丢失时发生。但在挂起情况下,我们也不会有任何异常。池大小和内存平衡有问题吗? –

+0

对不起,提供两个评论中的代码作为有限字符;)SchemeRegistry schemeRegistry = new SchemeRegistry(); (新的Scheme(“http”,80,PlainSocketFactory.getSocketFactory()));}} \t \t schemeRegistry.register(new Scheme(“https”,443,SSLSocketFactory。在getSocketFactory())); \t \t PoolingClientConnectionManager httpConnectionManager = new PoolingClientConnectionManager(schemeRegistry); \t \t httpConnectionManager.setMaxTotal(500); \t \t httpConnectionManager.setDefaultMaxPerRoute(200); DefaultHttpClient httpClient = new DefaultHttpClient(httpConnectionManager); –

+0

httpClient.getParams()。setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,true); \t \t requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient); \t \t requestFactory.setConnectTimeout(30000); \t \t requestFactory.setReadTimeout(30000);\t \t knlogger.info(methodname,“Created requestFactory”); –