You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by MQ Newbie <su...@sphsearch.sg> on 2007/12/27 11:07:07 UTC
JDBCPersistenceAdapter Too many connections
I encountered the following error after submitting about 6-8 jms message
consecutively on Master/Slave architecture. Please advise. Thank you.
WARN JDBCPersistenceAdapter - Old message cleanup failed due to:
java.io.IOException: Too many connections
java.io.IOException: Too many connections
at
org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:61)
at
org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDeleteOldMessages(DefaultJDBCAdapter.java:570)
at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.cleanup(JDBCPersistenceAdapter.java:213)
at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter$1.run(JDBCPersistenceAdapter.java:187)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by:
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too
many connections
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
at
com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
at sun.reflect.GeneratedConstructorAccessor10.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at
com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
at
org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
... 12 more
--
View this message in context: http://www.nabble.com/JDBCPersistenceAdapter-Too-many-connections-tp14511365s2354p14511365.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: JDBCPersistenceAdapter Too many connections
Posted by James Strachan <ja...@gmail.com>.
On 02/01/2008, MQ Newbie <su...@sphsearch.sg> wrote:
>
> Can you please provide me an example configuration for this?
Set the maxActive property to the number you require.
See
http://commons.apache.org/dbcp/api-1.2.2/org/apache/commons/dbcp/BasicDataSource.html
I've updated the default activemq.xml to limit the number to 200
https://svn.apache.org/repos/asf/activemq/trunk/assembly/src/release/conf/activemq.xml
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: JDBCPersistenceAdapter Too many connections
Posted by MQ Newbie <su...@sphsearch.sg>.
Can you please provide me an example configuration for this?
James.Strachan wrote:
>
> Your database is refusing new connections. Either increase the number
> of available connections on your database, or specify a limit in the
> DBCP configuration in activemq.xml
>
> On 27/12/2007, MQ Newbie <su...@sphsearch.sg> wrote:
>>
>> I encountered the following error after submitting about 6-8 jms message
>> consecutively on Master/Slave architecture. Please advise. Thank you.
>>
>> WARN JDBCPersistenceAdapter - Old message cleanup failed due to:
>> java.io.IOException: Too many connections
>> java.io.IOException: Too many connections
>> at
>> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
>> at
>> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:61)
>> at
>> org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDeleteOldMessages(DefaultJDBCAdapter.java:570)
>> at
>> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.cleanup(JDBCPersistenceAdapter.java:213)
>> at
>> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter$1.run(JDBCPersistenceAdapter.java:187)
>> at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>> at
>> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>> at
>> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>> at
>> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>> at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>> at java.lang.Thread.run(Thread.java:619)
>> Caused by:
>> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too
>> many connections
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>> at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>> at com.mysql.jdbc.Util.getInstance(Util.java:381)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985)
>> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
>> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
>> at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
>> at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
>> at
>> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
>> at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
>> at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
>> at sun.reflect.GeneratedConstructorAccessor10.newInstance(Unknown
>> Source)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>> at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
>> at
>> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
>> at
>> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
>> at
>> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
>> at
>> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
>> at
>> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
>> at
>> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
>> at
>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
>> at
>> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
>> ... 12 more
>>
>> --
>> View this message in context:
>> http://www.nabble.com/JDBCPersistenceAdapter-Too-many-connections-tp14511365s2354p14511365.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
>
--
View this message in context: http://www.nabble.com/JDBCPersistenceAdapter-Too-many-connections-tp14511365s2354p14572207.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: JDBCPersistenceAdapter Too many connections
Posted by James Strachan <ja...@gmail.com>.
Your database is refusing new connections. Either increase the number
of available connections on your database, or specify a limit in the
DBCP configuration in activemq.xml
On 27/12/2007, MQ Newbie <su...@sphsearch.sg> wrote:
>
> I encountered the following error after submitting about 6-8 jms message
> consecutively on Master/Slave architecture. Please advise. Thank you.
>
> WARN JDBCPersistenceAdapter - Old message cleanup failed due to:
> java.io.IOException: Too many connections
> java.io.IOException: Too many connections
> at
> org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
> at
> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:61)
> at
> org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doDeleteOldMessages(DefaultJDBCAdapter.java:570)
> at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.cleanup(JDBCPersistenceAdapter.java:213)
> at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter$1.run(JDBCPersistenceAdapter.java:187)
> at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
> at java.lang.Thread.run(Thread.java:619)
> Caused by:
> com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too
> many connections
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
> at com.mysql.jdbc.Util.getInstance(Util.java:381)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:985)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3376)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3308)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:894)
> at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3808)
> at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1256)
> at
> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2032)
> at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:729)
> at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
> at sun.reflect.GeneratedConstructorAccessor10.newInstance(Unknown
> Source)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
> at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
> at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:283)
> at
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
> at
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
> at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:771)
> at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
> at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:544)
> at
> org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:54)
> ... 12 more
>
> --
> View this message in context: http://www.nabble.com/JDBCPersistenceAdapter-Too-many-connections-tp14511365s2354p14511365.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com