2 Replies Latest reply on May 4, 2003 6:50 PM by Ivan N. Zhidov

    oracle connections slows down over a period of time

    Ivan N. Zhidov Newbie


      I have a deployment on JBoss 3.0.4/Oracle 8.1.7 and it appears that over a period of time the database calls start slowing down. The DBAs and netwrok admins say they don't see any congestion in the database and the switch so my only option left is the driver, may be some crazy GC related stuff. The application uses the database very intensively. I'm going to try upgrading the driver from classes12.zip to ojdbc14.jar but wanted first check and see if anybody had a similar problem. Same application handled even more database calls running on JBoss 2.4.3/Oracle 8.1.6(driver) w/o any problems so any feedback would much appreciated.

        • 1. Re: oracle connections slows down over a period of time
          Kayvan Mojarrad Newbie

          I don't know much about your specifics but before changing the drivers it's worth checking your JVM memory allocation. Jboss 3.0.4 comes with standard-jboss.xml configured with a bean cache size of 1000000. This will speed things up if you have allocated enough memory to hold the cache but will seriously slow down operations and eventually bring Jboss to a halt with OutOfMemory Errors if you have not.
          To allocate memory to the JVM:

          For standalone apps:
          java "-Xmx256M" javaoptions classpath mainclass

          For Jboss:
          Set the JAVA_OPTS environment variable so it's available to Jboss statup.bat/sh:

          This allocates 256Meg with which I found I still needed to cut the cache size down to 100000 beans. This can be done by overriding container configurations for the type of container (ie Standard CMP 2.x EntityBean) in jboss.xml.

          Add this to the top of your jboss.xml (This example is for ejb2.x Entity bean - for other container types copy the relevant fragment from standard-jboss.xml and adjust as necessary)

          <container-name>Standard CMP 2.x EntityBean</container-name>
          <!-- THIS IS THE NUMBER YOU TWEAK -->

          <!-- ************************** -->

          Hope this helps,

          • 2. Re: oracle connections slows down over a period of time
            Ivan N. Zhidov Newbie

            Well, the app doesn't use entity beans, it does use MDBs but the pools size is limited to 25, during the slow down memory is at ~100-110 MB and CPU is at 80%, the following is the line from my start up script JAVA_OPTS="$JAVA_OPTS -Xincgc -Xms64m -Xmx256m -Dprogram.name=$PROGNAME"

            so I assume it has room to grow. Thanks for the reply though, I've come across cache size problem before and it can bite you :)