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

      Hi,

      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

          Hi,
          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:
          JAVA_OPTS="-Xmx256M"

          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-configurations>
          <container-configuration>
          <container-name>Standard CMP 2.x EntityBean</container-name>
          <container-cache-conf>
          <cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
          <cache-policy-conf>
          <min-capacity>50</min-capacity>
          <!-- THIS IS THE NUMBER YOU TWEAK -->
          <max-capacity>1000000</max-capacity>

          <!-- ************************** -->
          <overager-period>300</overager-period>
          <max-bean-age>600</max-bean-age>
          <resizer-period>400</resizer-period>
          <max-cache-miss-period>60</max-cache-miss-period>
          <min-cache-miss-period>1</min-cache-miss-period>
          <cache-load-factor>0.75</cache-load-factor>
          </cache-policy-conf>
          </container-cache-conf>
          </container-configuration>
          </container-configurations>

          Hope this helps,
          kv.

          • 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 :)