一、现象复现
web程序跑起来很卡顿,十几分钟都跑步起来,而且页面刷新十几秒都没有反应。
三月 23, 2019 11:58:22 上午 com.mchange.v2.log.MLog <clinit>
信息: MLog clients using java 1.4+ standard logging.
三月 23, 2019 11:58:22 上午 com.mchange.v2.c3p0.C3P0Registry banner
信息: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10]
2019-03-23 11:59:17,128 [RMI TCP Connection(5)-127.0.0.1] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor - Initializing ExecutorService 'threadPoolTaskExecutor'
三月 23, 2019 12:01:10 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@57e63bbb -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
[WebappClassLoader@554b4ee7] weaveinfo Join point 'method-execution(java.sql.Connection com.mysql.jdbc.NonRegisteringDriver.connect(java.lang.String, java.util.Properties))' in Type 'com.mysql.jdbc.NonRegisteringDriver' (NonRegisteringDriver.java:306) advised by around advice from 'com.yy.aomi.sdk.mysql.aj.DriverAj' (DriverAj.java)
三月 23, 2019 12:01:16 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
警告: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@57e63bbb -- APPARENT DEADLOCK!!! Complete Status: Managed Threads: 3Active Threads: 3Active Tasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@294eaedf (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6792b35 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@78332a43 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)Pending Tasks: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@e7630a4com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@52925fe3com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1d7de607com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@7c7db6d9com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@43315ae2com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@31c6820com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@71a3eb9a
Pool thread stack traces:Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0,5,RMI Runtime]java.lang.Class.forName0(Native Method)java.lang.Class.forName(Class.java:264)com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1,5,RMI Runtime]java.net.URI$Parser.charAt(URI.java:2876)java.net.URI$Parser.scan(URI.java:2995)java.net.URI$Parser.checkChars(URI.java:3019)java.net.URI$Parser.parseHierarchical(URI.java:3105)java.net.URI$Parser.parse(URI.java:3053)java.net.URI.<init>(URI.java:673)java.net.URI.<init>(URI.java:774)java.io.File.toURI(File.java:735)org.apache.catalina.loader.WebappClassLoaderBase.getURI(WebappClassLoaderBase.java:3870)org.apache.catalina.loader.WebappClassLoaderBase.findResourceInternal(WebappClassLoaderBase.java:3408)org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3140)org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1373)org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1861)org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1735)com.mysql.jdbc.NonRegisteringDriver.ajc$preClinit(NonRegisteringDriver.java:1)com.mysql.jdbc.NonRegisteringDriver.<clinit>(NonRegisteringDriver.java)java.lang.Class.forName0(Native Method)java.lang.Class.forName(Class.java:264)com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,RMI Runtime]java.lang.Class.forName0(Native Method)java.lang.Class.forName(Class.java:264)com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSource.java:100)com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:132)com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)三月 23, 2019 12:01:16 下午 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager
信息: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 5, acquireRetryAttempts -> 60, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1br1hqka11at3cg6qe335i|644766ea, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1br1hqka11at3cg6qe335i|644766ea, idleConnectionTestPeriod -> 60, initialPoolSize -> 10, jdbcUrl -> jdbc:mysql://bigdragon.mysqlpl.yy.com:8066/dragon_v3_1?useUnicode=true&characterEncoding=utf-8&sessionVariables=group_concat_max_len=204800, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 10, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 100, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
三月 23, 2019 12:02:17 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner processReplacedThreads
警告: Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@294eaedf (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
三月 23, 2019 12:02:17 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner processReplacedThreads
警告: Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6792b35 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
三月 23, 2019 12:02:17 下午 com.mchange.v2.async.ThreadPoolAsynchronousRunner processReplacedThreads
二、原因
不小心在重写的方法头点击了debug标志,造成程序运行缓慢。