4
回答
Druid获得连接把程序挂死了,求解答!
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   

@wenshao 你好,想跟你请教个问题:我程序给挂死了,检查线程都是在Druid获得连接的地方挂住了,重启正常。下面是我Dump的线程信息,请指教一下。问题在哪里呢!

Thread 165: (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=226 (Compiled frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=68, line=2082 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.pollLast(long) @bci=75, line=1393 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(long) @bci=207, line=1023 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(long) @bci=2, line=900 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=30, line=4544 (Compiled frame)
 - com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(com.alibaba.druid.filter.FilterChain, com.alibaba.druid.pool.DruidDataSource, long) @bci=3, line=661 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=18, line=4540 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection(long) @bci=28, line=882 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=5, line=874 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=1, line=97 (Compiled frame)
 - org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(java.lang.Object, org.springframework.transaction.TransactionDefinition) @bci=29, line=203 (Interpreted frame)
 - org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(org.springframework.transaction.TransactionDefinition) @bci=204, line=372 (Interpreted frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.interceptor.TransactionAttribute, java.lang.String) @bci=37, line=417 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(java.lang.reflect.Method, java.lang.Class, org.springframework.transaction.interceptor.TransactionAspectSupport$InvocationCallback) @bci=49, line=255 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=40, line=94 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=18, line=91 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.framework.JdkDynamicAopProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=322, line=204 (Compiled frame)
 - $Proxy23.getResourceInstance(long) @bci=19 (Compiled frame)
 - com.chinawiserv.oc.dataprocess.bigData.MetricDataProcessorSyncService.process(com.chinawiserv.oc.dataprocess.MetricCalculateData, com.chinawiserv.oc.caplib.resource.ResourceMetricDef, com.chinawiserv.oc.metric.obj.CustomMetric, java.util.Map) @bci=33, line=35 (Interpreted frame)
 - com.chinawiserv.oc.dataprocess.engine.MetricDataProcessEngineImpl.handle(com.chinawiserv.oc.dataprocess.MetricCalculateData) @bci=771, line=150 (Compiled frame)
 - com.chinawiserv.oc.transfer.handler.MetricTransferDataHandler.handle(com.chinawiserv.oc.transfer.obj.TransferData) @bci=11, line=59 (Compiled frame)
 - com.chinawiserv.oc.transfer.TransferDataDispatcher$DataDispatch$1.run() @bci=37, line=225 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=46, line=1110 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=603 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)


Thread 164: (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=226 (Compiled frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=68, line=2082 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.pollLast(long) @bci=75, line=1393 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(long) @bci=207, line=1023 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(long) @bci=2, line=900 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=30, line=4544 (Compiled frame)
 - com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(com.alibaba.druid.filter.FilterChain, com.alibaba.druid.pool.DruidDataSource, long) @bci=3, line=661 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=18, line=4540 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection(long) @bci=28, line=882 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=5, line=874 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=1, line=97 (Compiled frame)
 - org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(java.lang.Object, org.springframework.transaction.TransactionDefinition) @bci=29, line=203 (Interpreted frame)
 - org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(org.springframework.transaction.TransactionDefinition) @bci=204, line=372 (Interpreted frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.interceptor.TransactionAttribute, java.lang.String) @bci=37, line=417 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(java.lang.reflect.Method, java.lang.Class, org.springframework.transaction.interceptor.TransactionAspectSupport$InvocationCallback) @bci=49, line=255 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=40, line=94 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=18, line=91 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.framework.JdkDynamicAopProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=322, line=204 (Compiled frame)
 - $Proxy23.getResourceInstance(long) @bci=19 (Compiled frame)
 - com.chinawiserv.oc.dataprocess.bigData.MetricDataProcessorSyncService.process(com.chinawiserv.oc.dataprocess.MetricCalculateData, com.chinawiserv.oc.caplib.resource.ResourceMetricDef, com.chinawiserv.oc.metric.obj.CustomMetric, java.util.Map) @bci=33, line=35 (Interpreted frame)
 - com.chinawiserv.oc.dataprocess.engine.MetricDataProcessEngineImpl.handle(com.chinawiserv.oc.dataprocess.MetricCalculateData) @bci=771, line=150 (Compiled frame)
 - com.chinawiserv.oc.transfer.handler.MetricTransferDataHandler.handle(com.chinawiserv.oc.transfer.obj.TransferData) @bci=11, line=59 (Compiled frame)
 - com.chinawiserv.oc.transfer.TransferDataDispatcher$DataDispatch$1.run() @bci=37, line=225 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=46, line=1110 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=603 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)


Thread 163: (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=226 (Compiled frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=68, line=2082 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.pollLast(long) @bci=75, line=1393 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(long) @bci=207, line=1023 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(long) @bci=2, line=900 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=30, line=4544 (Compiled frame)
 - com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(com.alibaba.druid.filter.FilterChain, com.alibaba.druid.pool.DruidDataSource, long) @bci=3, line=661 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=18, line=4540 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection(long) @bci=28, line=882 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=5, line=874 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=1, line=97 (Compiled frame)
 - org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(java.lang.Object, org.springframework.transaction.TransactionDefinition) @bci=29, line=203 (Interpreted frame)
 - org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(org.springframework.transaction.TransactionDefinition) @bci=204, line=372 (Interpreted frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.interceptor.TransactionAttribute, java.lang.String) @bci=37, line=417 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(java.lang.reflect.Method, java.lang.Class, org.springframework.transaction.interceptor.TransactionAspectSupport$InvocationCallback) @bci=49, line=255 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=40, line=94 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=18, line=91 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.framework.JdkDynamicAopProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=322, line=204 (Compiled frame)
 - $Proxy23.getResourceInstance(long) @bci=19 (Compiled frame)
 - com.chinawiserv.oc.dataprocess.bigData.MetricDataProcessorSyncService.process(com.chinawiserv.oc.dataprocess.MetricCalculateData, com.chinawiserv.oc.caplib.resource.ResourceMetricDef, com.chinawiserv.oc.metric.obj.CustomMetric, java.util.Map) @bci=33, line=35 (Interpreted frame)
 - com.chinawiserv.oc.dataprocess.engine.MetricDataProcessEngineImpl.handle(com.chinawiserv.oc.dataprocess.MetricCalculateData) @bci=771, line=150 (Compiled frame)
 - com.chinawiserv.oc.transfer.handler.MetricTransferDataHandler.handle(com.chinawiserv.oc.transfer.obj.TransferData) @bci=11, line=59 (Compiled frame)
 - com.chinawiserv.oc.transfer.TransferDataDispatcher$DataDispatch$1.run() @bci=37, line=225 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=46, line=1110 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=603 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)


Thread 162: (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=226 (Compiled frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=68, line=2082 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.pollLast(long) @bci=75, line=1393 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(long) @bci=207, line=1023 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(long) @bci=2, line=900 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=30, line=4544 (Compiled frame)
 - com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(com.alibaba.druid.filter.FilterChain, com.alibaba.druid.pool.DruidDataSource, long) @bci=3, line=661 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=18, line=4540 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection(long) @bci=28, line=882 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=5, line=874 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=1, line=97 (Compiled frame)
 - org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(java.lang.Object, org.springframework.transaction.TransactionDefinition) @bci=29, line=203 (Interpreted frame)
 - org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(org.springframework.transaction.TransactionDefinition) @bci=204, line=372 (Interpreted frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.interceptor.TransactionAttribute, java.lang.String) @bci=37, line=417 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(java.lang.reflect.Method, java.lang.Class, org.springframework.transaction.interceptor.TransactionAspectSupport$InvocationCallback) @bci=49, line=255 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=40, line=94 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=18, line=91 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.framework.JdkDynamicAopProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=322, line=204 (Compiled frame)
 - $Proxy23.getResourceInstance(long) @bci=19 (Compiled frame)
 - com.chinawiserv.oc.dataprocess.bigData.MetricDataProcessorSyncService.process(com.chinawiserv.oc.dataprocess.MetricCalculateData, com.chinawiserv.oc.caplib.resource.ResourceMetricDef, com.chinawiserv.oc.metric.obj.CustomMetric, java.util.Map) @bci=33, line=35 (Interpreted frame)
 - com.chinawiserv.oc.dataprocess.engine.MetricDataProcessEngineImpl.handle(com.chinawiserv.oc.dataprocess.MetricCalculateData) @bci=771, line=150 (Compiled frame)
 - com.chinawiserv.oc.transfer.handler.MetricTransferDataHandler.handle(com.chinawiserv.oc.transfer.obj.TransferData) @bci=11, line=59 (Compiled frame)
 - com.chinawiserv.oc.transfer.TransferDataDispatcher$DataDispatch$1.run() @bci=37, line=225 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=46, line=1110 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=603 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)


Thread 161: (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=226 (Compiled frame)
 - java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) @bci=68, line=2082 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.pollLast(long) @bci=75, line=1393 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(long) @bci=207, line=1023 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(long) @bci=2, line=900 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=30, line=4544 (Compiled frame)
 - com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(com.alibaba.druid.filter.FilterChain, com.alibaba.druid.pool.DruidDataSource, long) @bci=3, line=661 (Compiled frame)
 - com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(com.alibaba.druid.pool.DruidDataSource, long) @bci=18, line=4540 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection(long) @bci=28, line=882 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=5, line=874 (Compiled frame)
 - com.alibaba.druid.pool.DruidDataSource.getConnection() @bci=1, line=97 (Compiled frame)
 - org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(java.lang.Object, org.springframework.transaction.TransactionDefinition) @bci=29, line=203 (Interpreted frame)
 - org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(org.springframework.transaction.TransactionDefinition) @bci=204, line=372 (Interpreted frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(org.springframework.transaction.PlatformTransactionManager, org.springframework.transaction.interceptor.TransactionAttribute, java.lang.String) @bci=37, line=417 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(java.lang.reflect.Method, java.lang.Class, org.springframework.transaction.interceptor.TransactionAspectSupport$InvocationCallback) @bci=49, line=255 (Compiled frame)
 - org.springframework.transaction.interceptor.TransactionInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=40, line=94 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(org.aopalliance.intercept.MethodInvocation) @bci=18, line=91 (Compiled frame)
 - org.springframework.aop.framework.ReflectiveMethodInvocation.proceed() @bci=101, line=172 (Compiled frame)
 - org.springframework.aop.framework.JdkDynamicAopProxy.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) @bci=322, line=204 (Compiled frame)
 - $Proxy23.getResourceInstance(long) @bci=19 (Compiled frame)
 - com.chinawiserv.oc.dataprocess.bigData.MetricDataProcessorSyncService.process(com.chinawiserv.oc.dataprocess.MetricCalculateData, com.chinawiserv.oc.caplib.resource.ResourceMetricDef, com.chinawiserv.oc.metric.obj.CustomMetric, java.util.Map) @bci=33, line=35 (Interpreted frame)
 - com.chinawiserv.oc.dataprocess.engine.MetricDataProcessEngineImpl.handle(com.chinawiserv.oc.dataprocess.MetricCalculateData) @bci=771, line=150 (Compiled frame)
 - com.chinawiserv.oc.transfer.handler.MetricTransferDataHandler.handle(com.chinawiserv.oc.transfer.obj.TransferData) @bci=11, line=59 (Compiled frame)
 - com.chinawiserv.oc.transfer.TransferDataDispatcher$DataDispatch$1.run() @bci=37, line=225 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=46, line=1110 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=603 (Interpreted frame)
 - java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)





举报
何胜超
发帖于3年前 4回/949阅
顶部