activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "karthik.nar" <>
Subject MySQL Connection Pooling and Journaling
Date Tue, 09 May 2006 03:32:53 GMT


Here is my datasource setup for MySQL

  <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
    <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
    <property name="url"
    <property name="username" value="activemq"/>
    <property name="password" value="activemq"/>
    <property name="poolPreparedStatements" value="true"/>
	<property name="initialSize" value="30"/>
	<property name="maxActive" value="60"/>
	<property name="maxIdle" value="300"/>
	<property name="maxWait" value="-1"/>
	<property name="removeAbandoned" value="true"/>
	<property name="logAbandoned" value="false"/>
	<property name="removeAbandonedTimeout" value="5"/>

At the MySQL prompt i use 

show processlist;

to see how many connections are active.

I run a producer program with 30 threads, enqueing 10 messages each.

Now when I use the configuration:

	      <journaledJDBC journalLogFiles="5" dataDirectory="../activemq-data"

i see no issues regarding connections growing.  

however when I use this configuration:

      <jdbcPersistenceAdapter dataSource="#mysql-ds"/>

i find that connections to the DB shoot up and after a few seconds I get the
"Too Many Connections" Error from MySQL.  At the command prompt I see 100

Since maxActive is set to 60,  does this mean that ActiveMQ bypasses the
connection pool for some other reasons, when journaling is turned off?

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message