Stuck Thread Weblogic

时间:2017-05-24 09:49:07

标签: java spring hibernate weblogic

使用spring mvc和hibernate,应用程序托管在weblogic中。通过DAO IMPL在少数休眠调用中遇到线程问题。任何人都可以建议如何前进。

####<May 21, 2017 9:09:08 AM CDT> <Error> <WebLogicServer> <AUSPWDCPPROD01> <AdminServer> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1495375748894> <BEA-000337> <[STUCK] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "624" seconds working on the request "Workmanager: default, Version: 0, Scheduled=true, Started=true, Started time: 624704 ms
", which is more than the configured time (StuckThreadMaxTime) of "600" seconds in "server-failure-trigger". Stack trace:
    sun.misc.Unsafe.park(Native Method)
    java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    org.apache.commons.pool2.impl.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:583)
    org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:442)
    org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)
    org.apache.commons.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)
    org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
    org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
    org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:35)
    org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:99)
    org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:129)
    org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:247)
    org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:254)
    org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:203)
    org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:56)
    org.hibernate.internal.AbstractSharedSessionContract.beginTransaction(AbstractSharedSessionContract.java:387)
    com.dell.dcp.dao.Impl.ClaimDaoImpl.submitClaimAction(ClaimDaoImpl.java:339)
    sun.reflect.GeneratedMethodAccessor1025.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:497)
    org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
    com.sun.proxy.$Proxy271.submitClaimAction(Unknown Source)
    com.dell.dcp.services.Impl.ClaimServiceImpl.submitClaimAction(ClaimServiceImpl.java:68)
    com.dell.dcp.controllers.ClaimController.submitClaimAction(ClaimController.java:234)
    sun.reflect.GeneratedMethodAccessor1024.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:497)
    org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
    org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
    org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:751)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
    weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    com.dell.dcp.controllers.AuthenticationFilter.doFilter(AuthenticationFilter.java:42)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3436)
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3402)
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
    weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2285)
    weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2201)
    weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1572)
    weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:255)
    weblogic.work.ExecuteThread.execute(ExecuteThread.java:311)
    weblogic.work.ExecuteThread.run(ExecuteThread.java:263)

2 个答案:

答案 0 :(得分:2)

你确定这是一个真正的卡住,还是只是一个长期服务? Weblogic将标记运行时间超过StuckThreadMaxTime的线程,默认情况下为600。你应该检查它是否是一个真正的问题。如果没有,那么将StuckThreadMaxTime增加到更高的值,您将不会收到此错误。如果是应用程序问题,那么应该在应用程序中找到它。

答案 1 :(得分:0)

问题是由于Session.close();未在许多地方实施。