测试 b3log 的时候,测试 100 并发就出问题了,建议将文章静态化,或者将 latke 的 C3P0 的配置写到一个配置文件
[ERROR]-[2016-01-18 11:57:35]-[org.b3log.latke.repository.jdbc.JdbcRepository:168]: Failed to initialize JDBC transaction java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106) at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:527) at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at org.b3log.latke.repository.jdbc.util.Connections.getConnection(Connections.java:228) at org.b3log.latke.repository.jdbc.JdbcTransaction.(JdbcTransaction.java:51) at org.b3log.latke.repository.jdbc.JdbcRepository.beginTransaction(JdbcRepository.java:820) at org.b3log.latke.repository.AbstractRepository.beginTransaction(AbstractRepository.java:205) at org.b3log.solo.service.ArticleMgmtService.incViewCount(ArticleMgmtService.java:660) at org.b3log.solo.service.ArticleMgmtService_$$_javassist_22._d9incViewCount(ArticleMgmtService_$$_javassist_22.java) at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101) at org.b3log.solo.service.ArticleMgmtService_$$_javassist_22.incViewCount(ArticleMgmtService_$$_javassist_22.java) at org.b3log.solo.processor.ArticleProcessor.showArticle(ArticleProcessor.java:943) at org.b3log.solo.processor.ArticleProcessor_$$_javassist_74._d16showArticle(ArticleProcessor_$$_javassist_74.java) at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.b3log.latke.ioc.bean.JavassistMethodHandler.invoke(JavassistMethodHandler.java:101) at org.b3log.solo.processor.ArticleProcessor_$$_javassist_74.showArticle(ArticleProcessor_$$_javassist_74.java) at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.b3log.latke.servlet.handler.MethodInvokeHandler.handle(MethodInvokeHandler.java:58) at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:94) at org.b3log.latke.servlet.handler.AdviceHandler.handle(AdviceHandler.java:108) at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:94) at org.b3log.latke.servlet.handler.ArgsHandler.handle(ArgsHandler.java:60) at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:94) at org.b3log.latke.servlet.handler.RequestDispatchHandler.handle(RequestDispatchHandler.java:95) at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:94) at org.b3log.latke.servlet.handler.RequestPrepareHandler.handle(RequestPrepareHandler.java:45) at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:94) at org.b3log.latke.servlet.handler.StaticResourceHandler.handle(StaticResourceHandler.java:125) at org.b3log.latke.servlet.HttpControl.nextHandler(HttpControl.java:94) at org.b3log.latke.servlet.DispatcherServlet.service(DispatcherServlet.java:84) 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.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:488) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:473) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207) 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:1070) 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) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: com.mchange.v2.resourcepool.TimeoutException: A client timed out while waiting to acquire a resource from com.mchange.v2.resourcepool.BasicResourcePool@4b7147c0 -- timeout at awaitAvailable() at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1317) at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) ... 57 more
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于