File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Application Control heap size of DB2 with JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Application Control heap size of DB2 with JDBC" Watch "Application Control heap size of DB2 with JDBC" New topic
Author

Application Control heap size of DB2 with JDBC

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
Hi,

There is a problem I am facing with DB2 database. We are unable to figure out whether the problem is with database or application level.

When this exception occured we saw that the exception was related to heap size of the database.

We checked the heap size it was 512, we increased it to 3092 but still problem persisted so we finally increased it to 8093.

Where as a similar application is runing with 512 heap size at the database with no problems.

We found that root where the exception encountered in the java program is where we say ResultSet.next and not with ResultSet.executeQuery.

We are confused here as we thought the problem might be with the database but when the problem occurs we restart the tomcat and for some days problem does not comes.

How come a database problem be solved because of the tomcat restart.

APP_CTL_HEAP_SZ is the database parameter which has to be set using database specific query.

for your info the data that is being fetched fromthe database when we encounter the exception is of type BLOB (blob like) as the data contains PHOTO and signature.

We only need your suggestions that will help us to find out the root cause.

Thanks

Rakesh K


Rakesh Kadulkar
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29274
    
140

Rakesh,
Is it possible you have a resource leak in your application? This would explain why Tomcat restarting would help - it would purge those held connections/memory.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
Jeanne you mean to say that there are some connection which are unnecessarily open.

As far as I am aware of the project we are using a framework which automatically establishes a connection to the database before a business method call and releases it immediately after the method completes.

Well I am getting a clue that , my business method is very huge and at some parts only I need database hit and I am may be unnecessarily holding the conenction.

Let see what I can do with that.

Anyways thanks.

Rakesh K
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application Control heap size of DB2 with JDBC
 
Similar Threads
Memory issue with Jonas Server while deploying a war.
Heap Dump Issue POI Jar
JVM Out Of Memory...How to increase Heap Size??
Heap Dump Issue POI Jar
Heap Dump Issue POI Jar