JDBC+C3P0 处理数据一段时间后挂掉!求解?!

蜡笔小新_ 发布于 2014/06/27 10:33
阅读 926
收藏 0

oracle+jdbc+c3p0+批处理

就这么点东西,简单从excel读取数据插入到数据库,大概有40几万吧

但是执行了一会后就挂掉了,网上说要增大数据库的连接数,还是不解,请大家给我出出主意怎么处理。

c3p0基本配置:

<c3p0-config>
		<default-config>
				<property name="user">cognos</property>
				<property name="password">aixsdcnc</property>
				<property name="driverClass">oracle.jdbc.driver.OracleDriver</property>
				<property name="jdbcUrl">jdbc:oracle:thin:@IP:1521:cognos</property>
				<property name="initialPoolSize">10</property>
				<property name="maxIdleTime">30</property>
				<property name="maxPoolSize">20</property>
				<property name="minPoolSize">5</property>
		</default-config>
</c3p0-config>



异常:
六月 27, 2014 10:25:38 上午 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
WARNING: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@122bfc2 -- APPARENT DEADLOCK!!! Creating emergency threads for unassigned pending tasks!
六月 27, 2014 10:25:38 上午 com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector run
WARNING: com.mchange.v2.async.ThreadPoolAsynchronousRunner$DeadlockDetector@122bfc2 -- APPARENT DEADLOCK!!! Complete Status: 
	Managed Threads: 3
	Active Threads: 3
	Active Tasks: 
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@145e5ac (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2)
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1e9a8e3 (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1)
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@14ef1ea (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0)
	Pending Tasks: 
		com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1ec4abb
Pool thread stack traces:
	Thread[com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2,5,main]
		java.net.SocketInputStream.socketRead0(Native Method)
		java.net.SocketInputStream.read(SocketInputStream.java:150)
		java.net.SocketInputStream.read(SocketInputStream.java:121)
		oracle.net.ns.Packet.receive(Unknown Source)
		oracle.net.ns.DataPacket.receive(Unknown Source)
		oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1104)
		oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1075)
		oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:272)
		oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)
		oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
		oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
		oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
		oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
		com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
		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,main]
		java.net.SocketInputStream.socketRead0(Native Method)
		java.net.SocketInputStream.read(SocketInputStream.java:150)
		java.net.SocketInputStream.read(SocketInputStream.java:121)
		oracle.net.ns.Packet.receive(Unknown Source)
		oracle.net.ns.DataPacket.receive(Unknown Source)
		oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1104)
		oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1075)
		oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:272)
		oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)
		oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
		oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
		oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
		oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
		com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
		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-#0,5,main]
		java.net.SocketInputStream.socketRead0(Native Method)
		java.net.SocketInputStream.read(SocketInputStream.java:150)
		java.net.SocketInputStream.read(SocketInputStream.java:121)
		oracle.net.ns.Packet.receive(Unknown Source)
		oracle.net.ns.DataPacket.receive(Unknown Source)
		oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.net.ns.NetInputStream.read(Unknown Source)
		oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1104)
		oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1075)
		oracle.jdbc.driver.T4CTTIoauthenticate.receiveOsesskey(T4CTTIoauthenticate.java:272)
		oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:357)
		oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
		oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
		oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
		oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
		com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
		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)
六月 27, 2014 10:26:53 上午 com.mchange.v2.async.ThreadPoolAsynchronousRunner processReplacedThreads
WARNING: Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@145e5ac (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
六月 27, 2014 10:26:53 上午 com.mchange.v2.async.ThreadPoolAsynchronousRunner processReplacedThreads
WARNING: Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1e9a8e3 (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().
六月 27, 2014 10:26:53 上午 com.mchange.v2.async.ThreadPoolAsynchronousRunner processReplacedThreads
WARNING: Task com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@14ef1ea (in deadlocked PoolThread) failed to complete in maximum time 60000ms. Trying interrupt().



加载中
0
dsgfdsgf
dsgfdsgf
换tomcat7的新连接池吧
蜡笔小新_
蜡笔小新_
说的是Tomcat jdbc pool吧 没用过,不过可以了解一下
返回顶部
顶部