Link to home
Start Free TrialLog in
Avatar of Thomsi
Thomsi

asked on

To set JVM memory size for a web application

Hi,
I have a problem pertaining to the memory size of JVM for my web application which is on Netscape Enterprise Server 3.5. When I try to retrieve a veruy large amount of data across all my tables, I am receiving "java.lang.OutOfMemoryError". In some some site I read that for stand alone applications we can set the maximum value to a higher value by the command :
java -mx128m MyApp

Can anybody have any solution for my problem as my web application is not working now.
Avatar of conick
conick

A web application will work similarly to a standalone in that you can specify the memory usage. The difference is where you specify it. In a web app you generally specify it in a config file. Im not familar with the Netscape product so check your documentation or maybe someone else is familar with it.

So may also want to specify fetch size for the ResultSet if your DB driver supports it. This will limit the amount of memory the driver uses in queries by only grabbing x records at a time.
how are you starting your web application, through some script where it must say

java ....

just put the above jvm options after the java command.

We need to know how you start your web application in order to better assist you

vemul
Avatar of Thomsi

ASKER

Its a servlet based application. When we are trying to get a report across organization, it returns a huge amount of data. At that time the error occurs. I am using Oracle 8i database.
ASKER CERTIFIED SOLUTION
Avatar of conick
conick

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thomsi:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for conick

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for conick

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer