Guest User

Hi. We have a webpage that calls for the identical query 4 times at WAS. (as SQL divided 50 values with SUM and COUNT. I don’t think we have a problem with tuning.) whenever we call for the same query 4 times, a line is being hold on the 4th. Such line continues to be stocked upon the active service. As a result, the Connection Pool became full. I have no choice but to restart the server. We are in the process of checking the program itself, however, when we tested it with Tomcat, we did not find anything wrong. (had no problem on directly query on DBMS, and the response time is about 0.4 second.) if you know how to fix the error, please let me know. I kindly attached the StackTrace below. Thanks for your support.

java.net.SocketInputStream.socketRead0(Native Method) 
java.net.SocketInputStream.read(SocketInputStream.java:140) 
com.javaservice.lwst.SocketWrapper$InputStreamWrap.read(Unknown Source) 
oracle.net.ns.Packet.receive(Packet.java:308) 
oracle.net.ns.DataPacket.receive(DataPacket.java:106) 
oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:324) 
oracle.net.ns.NetInputStream.read(NetInputStream.java:268) 
oracle.net.ns.NetInputStream.read(NetInputStream.java:190) 
oracle.net.ns.NetInputStream.read(NetInputStream.java:107) 
oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124) 
oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80) 
oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137) 
oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350) 
oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) 
oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) 
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208) 
oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886) 
oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175) 
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296) 
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613) 
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3714) 
oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378) 
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) 
org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) 
net.sf.log4jdbc.PreparedStatementSpy.execute(PreparedStatementSpy.java:418) 
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:185) 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221) 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForObject(MappedStatement.java:120) 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:518) 
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:493) 
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106) 
org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(SqlMapClientTemplate.java:270) 
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:200) 
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMapClientTemplate.java:268) 
egovframework.rte.psl.dataaccess.EgovAbstractDAO.selectByPk(EgovAbstractDAO.java:129) 
kapt.apiinfo.dao.ApiSearchDAO.getCostDetail(ApiSearchDAO.java:578) 
kapt.apiinfo.service.ApiSearchServiceImpl.getCostDetail(ApiSearchServiceImpl.java:760) 
sun.reflect.GeneratedMethodAccessor146.invoke(Unknown Source) 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 
java.lang.reflect.Method.invoke(Method.java:611) 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) 
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) 
com.sun.proxy.$Proxy45.getCostDetail(Unknown Source) 
kapt.apiinfo.controller.ApiSearchMngController.costSearch(ApiSearchMngController.java:593) 
sun.reflect.GeneratedMethodAccessor193.invoke(Unknown Source) 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) 
java.lang.reflect.Method.invoke(Method.java:611) 
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:426)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:414)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790) 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:575) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:668) 
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230) 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779) 
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) 
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) 
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) 
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960) 
com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064) 
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3826) 
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) 
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976) 
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) 
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459) 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526) 
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312) 
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88) 
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) 
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 
com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) 
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) 
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) 
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) 
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)

Khalid Saeed

According to the current stack, it seems that the stack is in the middle of running query. Will it be possible to see if the query is running at the moment?

Guest User

the query is in process with over 10 FETCH. Among them, the identical queries have been processed at [1/2], [1/4], [1/6] and [1/80]. I am satisfied with response time on No. 2, 4 and 6, however, I noticed a gap of 166,086 on No.8. (GAP was recorded as 25 for NO.2, 38 for No. 61. I noticed the SELECT 1 FROM DUAL for No. 1,3,5 and 7.) I would like to know what created a line especially on No.8. It became completed after a few moments. The identical query with different conditions made huge GAP on the No.4. When I recalled the query, the Active Service continued to be piled up. Please refer to the attached file of related query below. Thanks for your support.

Khalid Saeed

The GAP indicated below is the result of running sql. It took 166 seconds to do query.
0018[17:08:41 183][166,086][ 0] SQL-EXECUTE [166,085 ms]