I tried doing testing on our application with 10 user simultaneously doing a search use case. I ran a thread along with the application that shows how many simultaneous connections are made and check if the connections are being closed. I found out in the logs that connnections are not being closed when stress testing 10 or more users. When I test it..say 5 users or 2 users...I could see that the connections are being closed. Also there is this JVM error that comes out everytime I stress test it with 10 or more users.
JVMDG217: Dump Handler is Processing a Signal - Please Wait. JVMDG315: JVM Requesting Heap dump file ...........JVMDG318: Heap dump file written to C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\heapdump.20070329.183955.2964.txt JVMDG303: JVM Requesting Java core file JVMDG304: Java core file written to C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\javacore.20070329.184149.2964.txt JVMDG215: Dump Handler has Processed Outofmemory Signal -1.
Is this the primary cause of the connections not being closed?
I'd appreciate any form of help. Thanks and have a nice day everyone.
[3/29/07 18:45:18:422 CST] 62ef8d08 WebGroup E SRVE0026E: [Servlet Error]-: java.lang.OutOfMemoryError at com.ibm.websphere.jdbc.sqlserver.SQLServerByteOrderedDataReader.<init>(Unknown Source) at com.ibm.websphere.jdbc.sqlserver.tds.TDSConnection.createReader(Unknown Source) at com.ibm.websphere.jdbc.sqlserver.SQLServerImplStatement.<init>(Unknown Source) at com.ibm.websphere.jdbc.sqlserver.SQLServerImplConnection.createImplStatement(Unknown Source) at com.ibm.websphere.jdbc.base.BaseStatement.setupImplStatement(Unknown Source) at com.ibm.websphere.jdbc.base.BaseStatement.<init>(Unknown Source) at com.ibm.websphere.jdbc.base.BasePreparedStatement.<init>(Unknown Source) at com.ibm.websphere.jdbc.base.BaseConnection.prepareStatement(Unknown Source) at com.ibm.websphere.jdbcx.base.BasePooledConnection.prepareStatement(Unknown Source) at com.ibm.websphere.jdbcx.base.BaseConnectionWrapper.prepareStatement(Unknown Source) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code)) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java(Compiled Code))
If you can simulate 5 users hitting your system for an extended amount of time (say, a few hours) and not get an OutOfMemoryError while 10 simultaneous users get an OOM immediately, I'd say the culprit is that your VM doesn't have enough memory to support 10 simultaneous users. If this is the case, consult your WebSphere documentation for instructions on how to increase the memory available to the VM. If 5 users get an OutOfMemoryError after a period of use, then you have some sort of leak (files, database connections, collections, sockets, threads and many other resources, if not cleaned up properly, will contribute to leaks). These leaks require some detective work to identify and resolve.
As mentioned by Joe Ess, if get a leak try to analyze the Heap Dump and yoy may see which objects are staying alive in the heap and are probably the cause of your leak. Sun is providing some tools like HAT (Heap Analysis Tool)
You can use these above tools to debug your dump files. You also need to read IBM red book "sg246198 - IBM WebSphere V5.1 Performance, Scalability, and High Availability". You can search "heap dump" keyword for more detail. The author also gave useful strategies to test, to set production environment of JVM heap memory settings.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop