wso2 / product-iots

Welcome to the WSO2 IoT Server source code! For info on working with the WSO2 IoT Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
184 stars 181 forks source link

[APPM-921] JDBC pool exhausted issue. #932

Closed madhawap closed 7 years ago

madhawap commented 7 years ago

continuously create apps through the jmeter script attached.

made 50 apps through the jmeter script and tried to add an app through the publisher. and the following error was thrown;

 TID: [0] [AM] [2015-05-18 06:30:32,526] ERROR {org.wso2.carbon.social.sql.SQLActivityPublisher} - Unable to publish the target: webapp:73000a03-e3ca-47a6-bc30-d827ce2bda7c in to the rating cache.[http-nio-9443-exec-1] Timeout: Pool empty. Unable to fetch a connection in 60 seconds, none available[size:50; busy:50; idle:0; lastwait:60000]. {org.wso2.carbon.social.sql.SQLActivityPublisher} org.apache.tomcat.jdbc.pool.PoolExhaustedException: [http-nio-9443-exec-1] Timeout: Pool empty. Unable to fetch a connection in 60 seconds, none available[size:50; busy:50; idle:0; lastwait:60000]. at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:674) at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188) at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128) at org.wso2.carbon.social.sql.DSConnection.getConnection(DSConnection.java:51) at org.wso2.carbon.social.sql.SQLActivityPublisher.warmUpRatingCache(SQLActivityPublisher.java:656) at org.wso2.carbon.social.core.service.SocialActivityService.warmUpRatingCache(SocialActivityService.java:198) at sun.reflect.GeneratedMethodAccessor336.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.publisher.assets.default.c1._c_anonymous_8(/publisher/assets/default/asset.jag:374) at org.jaggeryjs.rhino.publisher.assets.default.c1.call(/publisher/assets/default/asset.jag) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.jaggeryjs.rhino.publisher.modules.c4._c_anonymous_12(/publisher/modules/router-g.js:183) at org.jaggeryjs.rhino.publisher.modules.c4.call(/publisher/modules/router-g.js) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org.jaggeryjs.rhino.publisher.assets.default.c1._c_anonymous_1(/publisher/assets/default/asset.jag:785) at org.jaggeryjs.rhino.publisher.assets.default.c1.call(/publisher/assets/default/asset.jag) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:269) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org.jaggeryjs.rhino.publisher.modules.c6._c_anonymous_17(/publisher/modules/publisher.js:438) at org.jaggeryjs.rhino.publisher.modules.c6.call(/publisher/modules/publisher.js) at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23) at org.mozilla.javascript.gen._store__server_js_36._c_anonymous_17([store]/server.js:271) at org.mozilla.javascript.gen._store__server_js_36.call([store]/server.js) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org.jaggeryjs.rhino.publisher.modules.c6._c_anonymous_16(/publisher/modules/publisher.js:433) at org.jaggeryjs.rhino.publisher.modules.c6.call(/publisher/modules/publisher.js) at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) at org.jaggeryjs.rhino.publisher.assets.default.c1._c_script_0(/publisher/assets/default/asset.jag:19) at org.jaggeryjs.rhino.publisher.assets.default.c1.call(/publisher/assets/default/asset.jag) at org.jaggeryjs.rhino.publisher.assets.default.c1.exec(/publisher/assets/default/asset.jag) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567) at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) at org.jaggeryjs.jaggery.core.manager.WebAppManager.executeScript(WebAppManager.java:279) at org.jaggeryjs.jaggery.core.manager.WebAppManager.include(WebAppManager.java:133) at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386) at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63) at org.jaggeryjs.rhino.publisher.controllers.c4._c_anonymous_1(/publisher/controllers/asset_router.jag:87) at org.jaggeryjs.rhino.publisher.controllers.c4.call(/publisher/controllers/asset_router.jag) at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23) at org.jaggeryjs.rhino.publisher.controllers.c4._c_script_0(/publisher/controllers/asset_router.jag:8) at org.jaggeryjs.rhino.publisher.controllers.c4.call(/publisher/controllers/asset_router.jag) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.jaggeryjs.rhino.publisher.controllers.c4.call(/publisher/controllers/asset_router.jag) at org.jaggeryjs.rhino.publisher.controllers.c4.exec(/publisher/controllers/asset_router.jag) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567) at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:536) at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:378) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21) 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:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47) at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) TID: [0] [AM] [2015-05-18 06:30:32,528] WARN {JAGGERY.assets.default.asset:jag} - Unable to publish the asset: webapp:73000a03-e3ca-47a6-bc30-d827ce2bda7c to social cache. This may affect on sort by popularity function. {JAGGERY.assets.default.asset:jag} TID: [0] [AM] [2015-05-18 06:30:33,940] ERROR {org.wso2.carbon.appmgt.impl.idp.sso.SSOConfiguratorUtil} - Failed to setup SSO provider wso2is 5.0.0 for AppI050 {org.wso2.carbon.appmgt.impl.idp.sso.SSOConfiguratorUtil} 

Reference: https://wso2.org/jira/browse/APPM-921

geethkokila commented 7 years ago

App manager component is being rewritten for IoT server, and this will be addressed there. Hence closing the issue.