0 Replies Latest reply on Mar 18, 2009 6:32 AM by Amardeep Singh

    Problems with Mysql Proxy r/w spliiting and Jboss Pool

    Amardeep Singh Newbie

      Hi,

      We are trying to implement r/w splitting with Jboss as Application Server for our
      java application built on swt.

      We have successfully implemented Mysql Master Master Replication under following Setup-

      ServerA - Master
      ServerB - Master
      ServerC - Slave of ServerA
      ServerD - Slave of ServerB


      Everything works file using r/w splitting including load balancing.

      The issues we are facing is when we leave our application running for some time
      idle, jboss throws the following errors..

      WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Unable to fill pool
      org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

      ** BEGIN NESTED EXCEPTION **

      com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException
      MESSAGE: Unknown command

      STACKTRACE:

      com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Unknown command
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:921)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:812)
      at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3284)
      at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1182)
      at com.mysql.jdbc.Connection.createNewIO(Connection.java:2670)
      at com.mysql.jdbc.Connection.(Connection.java:1531)
      at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:171)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:524)
      at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
      at java.lang.Thread.run(Thread.java:595)

      ** END NESTED EXCEPTION **

      Last packet sent to the server was 2 ms ago.)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:179)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:524)
      at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:


      The current Setup of pool under r/w splitting is

      -- connection pool
      if not proxy.global.config.rwsplit then
      proxy.global.config.rwsplit = {
      min_idle_connections = 10,
      max_idle_connections = 20,

      is_debug = true
      }
      end

      Whereas Jboss pool is set to

      <min-pool-size>10</min-pool-size>
      <max-pool-size>2000</max-pool-size>

      I am not able to figure out what is causing problem jboss/proxy pool or something else due to which above error comes.

      Any help is really appreciated.

      Thanks,
      Veneet