File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases 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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Application Control heap size of DB2 with JDBC" Watch "Application Control heap size of DB2 with JDBC" New topic

Application Control heap size of DB2 with JDBC

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115

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 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.


Rakesh K

Rakesh Kadulkar
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33098

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.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, 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:
subject: Application Control heap size of DB2 with JDBC
It's not a secret anymore!