I've been trying to track down a leak somewhere in OFbiz, I'm hoping someone can give me a little help.
Basically, when multiple connections are made concurrently, one tends to remain open. The leak is slow and subtle, but it's definetly there. At first I thought it may be due to unclosed session objects, but as I started digging more, it appears to be something with the ofbiz SQL code. I set up ro.kifs ConnLeakFinder to track the connections, below is an example of one stack trace. Can anyone help track down the issue? ro.kifs.diagnostic.Connection.whoCalledMe() line:() line:62 ro.kifs.diagnostic.Connection.registerOpenedConnection() line:() line:27 ro.kifs.diagnostic.Connection.() line:() line:80 org.ofbiz.entity.jdbc.ConnectionFactory.getConnection() line:() line:81 org.ofbiz.entity.jdbc.SQLProcessor.getConnection() line:() line:262 org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement() line:() line:368 org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement() line:() line:352[code]ro.kifs.diagnostic.Connection.whoCalledMe() line:() line:62 ro.kifs.diagnostic.Connection.registerOpenedConnection() line:() line:27 ro.kifs.diagnostic.Connection.() line:() line:80 org.ofbiz.entity.jdbc.ConnectionFactory.getConnection() line:() line:81 org.ofbiz.entity.jdbc.SQLProcessor.getConnection() line:() line:262 org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement() line:() line:368 org.ofbiz.entity.jdbc.SQLProcessor.prepareStatement() line:() line:352 org.ofbiz.entity.datasource.GenericDAO.select() line:() line:528 org.ofbiz.entity.datasource.GenericDAO.select() line:() line:499 org.ofbiz.entity.datasource.GenericHelperDAO.findByPrimaryKey() line:() line:83 org.ofbiz.entity.GenericDelegator.findByPrimaryKey() line:() line:1250 org.ofbiz.entity.GenericDelegator.findByPrimaryKeyCache() line:() line:1289 org.ofbiz.entity.GenericDelegator.findByPrimaryKeyCache() line:() line:1315 org.ofbiz.entity.GenericDelegator.getRelatedOneCache() line:() line:2129 org.ofbiz.entity.GenericValue.getRelatedOneCache() line:() line:315 org.ofbiz.product.category.CategoryWorker.getRelatedCategoriesRet() line:() line:192 org.ofbiz.product.category.CategoryWorker.getRelatedCategoriesRet() line:() line:160 org.ofbiz.product.category.CategoryWorker.getRelatedCategories() line:() line:145 org.ofbiz.product.category.CategoryWorker.getRelatedCategories() line:() line:141 sun.reflect.GeneratedMethodAccessor75.invoke() line:() line:-1 sun.reflect.DelegatingMethodAccessorImpl.invoke() line:() line:25 java.lang.reflect.Method.invoke() line:() line:585 bsh.Reflect.invokeMethod() line:() line:-1 bsh.Reflect.invokeStaticMethod() line:() line:-1 bsh.Name.invokeMethod() line:() line:-1 bsh.BSHMethodInvocation.eval() line:() line:-1 bsh.BSHPrimaryExpression.eval() line:() line:-1 bsh.BSHPrimaryExpression.eval() line:() line:-1 bsh.Interpreter.evalParsedScript() line:() line:-1 bsh.Interpreter.evalParsedScript() line:() line:-1 org.ofbiz.base.util.BshUtil.runBshAtLocation() line:() line:164 org.ofbiz.widget.screen.ModelScreenAction$Script.runAction() line:() line:391 org.ofbiz.widget.screen.ModelScreenAction.runSubActions() line:() line:121 org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString() line:() line:240 org.ofbiz.widget.screen.ModelScreen.renderScreenString() line:() line:138 org.ofbiz.widget.screen.ScreenRenderer.render() line:() line:108 org.ofbiz.widget.screen.ScreenRenderer.render() line:() line:93 sun.reflect.GeneratedMethodAccessor53.invoke() line:() line:-1 sun.reflect.DelegatingMethodAccessorImpl.invoke() line:() line:25 java.lang.reflect.Method.invoke() line:() line:585 freemarker.ext.beans.BeansWrapper.invokeMethod() line:() line:840 freemarker.ext.beans.OverloadedMethodModel.exec() line:() line:104 freemarker.core.MethodCall._getAsTemplateModel() line:() line:93 freemarker.core.Expression.getAsTemplateModel() line:() line:89 freemarker.core.Expression.getStringValue() line:() line:93 freemarker.core.DollarVariable.accept() line:() line:76 freemarker.core.Environment.visit() line:() line:209 freemarker.core.MixedContent.accept() line:() line:92 freemarker.core.Environment.visit() line:() line:209 freemarker.core.Environment.process() line:() line:189 freemarker.template.Template.process() line:() line:237 org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplateAtLocation() line:() line:181 org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate() line:() line:85 org.ofbiz.widget.screen.HtmlWidget$HtmlTemplateDecorator.renderWidgetString() line:() line:163 org.ofbiz.widget.screen.HtmlWidget.renderWidgetString() line:() line:68 org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString() line:() line:809 org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString() line:() line:154 org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString() line:() line:247 org.ofbiz.widget.screen.ModelScreen.renderScreenString() line:() line:138 org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString() line:() line:492 org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString() line:() line:154 org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString() line:() line:247 org.ofbiz.widget.screen.ModelScreen.renderScreenString() line:() line:138 org.ofbiz.widget.screen.ScreenRenderer.render() line:() line:108 org.ofbiz.widget.screen.ScreenRenderer.render() line:() line:93 org.ofbiz.widget.screen.ScreenWidgetViewHandler.render() line:() line:81 org.ofbiz.webapp.control.RequestHandler.renderView() line:() line:680 org.ofbiz.webapp.control.RequestHandler.doRequest() line:() line:437 org.ofbiz.webapp.control.ControlServlet.doGet() line:() line:192 javax.servlet.http.HttpServlet.service() line:() line:595 javax.servlet.http.HttpServlet.service() line:() line:688 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter() line:() line:252 org.apache.catalina.core.ApplicationFilterChain.doFilter() line:() line:173 org.apache.catalina.core.ApplicationDispatcher.invoke() line:() line:672 org.apache.catalina.core.ApplicationDispatcher.processRequest() line:() line:463 org.apache.catalina.core.ApplicationDispatcher.doForward() line:() line:398 org.apache.catalina.core.ApplicationDispatcher.forward() line:() line:301 com.folica.opentaps.actions.ecommerce.url.UserFriendlyUrlServlet.process() line:() line:153 com.folica.opentaps.actions.ecommerce.url.UserFriendlyUrlServlet.doGet() line:() line:76 javax.servlet.http.HttpServlet.service() line:() line:595 javax.servlet.http.HttpServlet.service() line:() line:688 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter() line:() line:252 org.apache.catalina.core.ApplicationFilterChain.doFilter() line:() line:173 org.ofbiz.webapp.control.ContextFilter.doFilter() line:() line:251 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter() line:() line:202 org.apache.catalina.core.ApplicationFilterChain.doFilter() line:() line:173 org.apache.catalina.core.StandardWrapperValve.invoke() line:() line:213 org.apache.catalina.core.StandardContextValve.invoke() line:() line:178 org.apache.catalina.core.StandardHostValve.invoke() line:() line:126 org.apache.catalina.valves.ErrorReportValve.invoke() line:() line:105 org.apache.catalina.core.StandardEngineValve.invoke() line:() line:107 org.apache.catalina.valves.AccessLogValve.invoke() line:() line:541 org.apache.catalina.connector.CoyoteAdapter.service() line:() line:148 org.apache.coyote.http11.Http11Processor.process() line:() line:869 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection() line:() line:664 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket() line:() line:527 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt() line:() line:80 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() line:() line:684 -- View this message in context: http://n4.nabble.com/Database-connection-leak-tp1690875p1690875.html Sent from the OFBiz - Dev mailing list archive at Nabble.com.
