activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl de Boer <karl.de.b...@jnc.nl>
Subject Persistence Adapter Postgres JDBC issue
Date Wed, 13 Feb 2008 16:11:17 GMT

Hi All,

I am quite new to ActiveMQ and experimenting with the persistency providers.
I am using an ActiveMQ 5.1 SNAPHOT of about ten days old.
I have set up the jdbc persistency without journalling on PostgreSQL 8.1.x

I notice some strrange behaviour:

1: I see never any acknowledgements coming into  the table activemq_acks.
2. The messages table is growing, nothing seems to be removed.
3. But the queue is processed by one consumer and the queue is emptied in
the JMX view

And i constantly see the following error in the activemq log:

java.io.IOException: FATAL: sorry, too many clients already
        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.doRecoverNextMessages(DefaultJDBCAdapter.java:702)
        at
org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:230)
        at
org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:83)
        at
org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:75)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:190)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.hasNext(AbstractStoreCursor.java:105)
        at
org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:132)
        at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:986)
        at
org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1033)
        at org.apache.activemq.broker.region.Queue.iterate(Queue.java:887)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients
already
        at
org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:443)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:98)
        at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
        at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at
org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:382)
        at org.postgresql.Driver.connect(Driver.java:260)
        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
java.io.IOException: FATAL: sorry, too many clients already
        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.doRecoverNextMessages(DefaultJDBCAdapter.java:702)
        at
org.apache.activemq.store.jdbc.JDBCMessageStore.recoverNextMessages(JDBCMessageStore.java:230)
        at
org.apache.activemq.store.ProxyMessageStore.recoverNextMessages(ProxyMessageStore.java:83)
        at
org.apache.activemq.broker.region.cursors.QueueStorePrefetch.doFillBatch(QueueStorePrefetch.java:75)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.fillBatch(AbstractStoreCursor.java:190)
        at
org.apache.activemq.broker.region.cursors.AbstractStoreCursor.hasNext(AbstractStoreCursor.java:105)
        at
org.apache.activemq.broker.region.cursors.StoreQueueCursor.hasNext(StoreQueueCursor.java:132)
        at org.apache.activemq.broker.region.Queue.doPageIn(Queue.java:986)
        at
org.apache.activemq.broker.region.Queue.pageInMessages(Queue.java:1033)
        at org.apache.activemq.broker.region.Queue.iterate(Queue.java:887)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
Caused by: org.postgresql.util.PSQLException: FATAL: sorry, too many clients
already
        at
org.postgresql.core.v3.ConnectionFactoryImpl.readStartupMessages(ConnectionFactoryImpl.java:443)
        at
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:98)
        at
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
        at
org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
        at
org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at
org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
        at org.postgresql.Driver.makeConnection(Driver.java:382)
        at org.postgresql.Driver.connect(Driver.java:260)
        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


I added a maxactive  property to the dbcp.BasicDataSource datasource config
but this did not help.

The producer is a servlet and the consumer is a JBoss 4.2.2.GA EJB3 MDB
making use of the activemq5.1SNAPHOT resource adapter and communicating with
a remote queue.
Transaction behaviour in the MDB seems to be OK. 
Acknowledge mode is auto-Acknowledge

I also played with kaha provider but under heavy load not all
acknowledgements get through so the journal files continue to grow and are
never removed.
The scenario with the database i depicted above is not under heave load.
Just one msg per second.



Thnx in advance
Karl



-- 
View this message in context: http://www.nabble.com/Persistence-Adapter-Postgres-JDBC-issue-tp15459381s2354p15459381.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message