AnsweredAssumed Answered

long running mssql threads

Question asked by darminm on Apr 17, 2016
Hello –

Hopping for some help with long running thread we are experiencing.

We are using:

Alf 5.02 on Win 2012 R2
Tomcat 7.067
JDK 1.8.031

This is a repository with about 100k documents.  Thread does complete but it takes up to 60-70 secs.  Average completion time is about 15 seconds. It can complete in 2-3 seconds also.

alfresco global properties is all default settings - we use integrated security to connect to the database

Thread dump:

"http-apr-80-exec-1" - Thread t@159
   java.lang.Thread.State: RUNNABLE
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(Unknown Source)
   at java.net.SocketInputStream.read(Unknown Source)
   at com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1782)
   at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)
   - locked <de7de41> (a com.microsoft.sqlserver.jdbc.TDSReader)
   at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6154)
   at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6106)
   at com.microsoft.sqlserver.jdbc.SQLServerConnection$1ConnectionCommand.doExecute(SQLServerConnection.java:1756)
   at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
   at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
   - locked <20d81ff8> (a java.lang.Object)
   at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:1761)
   at com.microsoft.sqlserver.jdbc.SQLServerConnection.commit(SQLServerConnection.java:1938)
   at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
   at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334)
   at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211)
   at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139)
   at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115)
   at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:657)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:482)
   - locked <1ae8cb4> (a org.alfresco.util.transaction.SpringAwareUserTransaction)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:479)
   at com.comp.cont.alfresco.core.EmbeddedAlfrescoAdvice.invoke(EmbeddedAlfrescoAdvice.java:83)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at com.sun.proxy.$Proxy245.getPropertyDefinitionByRepoName(Unknown Source)
   at com.comp.cont.core.util.util.enhancedCompleteObjectTocontObject(util.java:509)
   at com.comp.cont.ph.core.RESTph.getChildrenWithLabels(RESTph.java:169)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
   at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:440)
   at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:428)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:198)
   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:176)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:160)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2466)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2455)
   - locked <43fe46cd> (a org.apache.tomcat.util.net.AprEndpoint$AprSocketWrapper)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
   - locked <72b9a354> (a java.util.concurrent.ThreadPoolExecutor$Worker)

Outcomes