2 Replies Latest reply on Jun 26, 2009 12:13 AM by Rohit Macherla

    Huge number of connection creation count irrespective of con

    Rohit Macherla Novice

      Hi all,

      I am using JBoss-4.2.2.GA server on a HP-UX machine. My application uses JAX-WS type webservices. I am using connection pooling and the connection pool parameters are :

      BlockingTimeoutMillis = 30000
      BackGroundValidationMinutes = 10
      PreFill = False
      BackGroundValidation = False
      ManagedConnectionFactoryName = jboss.jca:service=ManagedConnectionFactory,name=testapi
      UseFastFail = False
      Criteria = ByNothing
      ManagedConnectionPool = org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1e44d32
      PoolJndiName = testapi
      NoTxSeparatePools = False
      MinSize = 5
      MaxSize = 50
      Name = JBossManagedConnectionPool
      IdleTimeoutMinutes = 15

      After load testing my application, I found that :
      MaxConnectionsInUseCount = 9
      ConnectionCreatedCount = 6590
      ConnectionDestroyedCount = 6585

      I am eager to know why so many connections were created and destroyed even though my application uses Connection Pooling. Since connection creation takes time, I would like to know if there's a better way to handle connections.
      The jboss-ds.xml file for the connection pooling is :


      Thank you.

        • 1. Re: Huge number of connection creation count irrespective of
          Peter Johnson Master

          A little more information about your load testing would help. For example, if the load testing took several days and consisted for short spurts of activity (say, 100 users for 30 minutes) followed by a period of inactivity (say 30 minutes), then the results you are seeing are very logical. And what was the ConnectionCreatedCount before you started?

          One other thing to note - if the system is entirely idle, based on your settings, any existing connections will be dropped after 15 minutes, and 5 new connections automatically established. Thus on a system that was active, but then left idling for 24 hours, the ConnectionCreated/DestroyedCount would be incremented by 480 (5 connections * 4 cylces per hour * 24 hours).

          • 2. Re: Huge number of connection creation count irrespective of
            Rohit Macherla Novice

            Hi PeterJ,
            Thanks for the reply.
            The load testing happened on a single day for three hours from 6PM to 9PM. There was no period of inactivity and it was carried out for 20 users. There were 100 odd connections that were created by the time the testing started. These observations were made the next morning. Thank you for the observation that connection count would change because of the idle time.
            I would take the statistics again, this time just after the testing completes.