Link to home
Start Free TrialLog in
Avatar of A Q
A Q

asked on

How do I give java more memory for issue with OutOfMemoryError: Java heap space

How do I give java more memory for issue with :

"ERROR resultset
Exception in processing the request (4) : java.la
ng.OutOfMemoryError: Java heap space"


I'm on a server that has 16GB memory and most of it is not being used at all.
I see that everytime the java.exe gets around 300MB the entire application will crash, the and tomcat says things like
"ERROR resultset
Exception in processing the request (4) : java.la
ng.OutOfMemoryError: Java heap space"

etc etc

How can this be expanded?
ada.jpg
Avatar of A Q
A Q

ASKER

Avatar of A Q

ASKER

once java.exe goes up to around 300MB it will consistently crashes

even though I have set it to use  a lot more than  that

User generated image
Avatar of girionis
What happens if you run tomcat from command line?
What does the application do exactly? Post the (relevant part of) catalina.out showing the error.

Did the application work before? If so what changed?
Avatar of A Q

ASKER

okay there is something wierd I figured out, if I set it to anything at or below 1024 mb it works and the services start in services.msc on window server all versions.
but if I set it to anything more, even at 1025mb, it will not start up, UNLESS I do exact multiples of 24, like 1024, 1048, 1072 etc... this holds until it reaches a limit...

On a windows server 2008 32bit that only has 4GB total, the limit is around ~1600-ish but suprisingly on a windows server 2008 r2 64bit with tons of memory, the limit was only around ~1200

This is the exact same tomcat5.exe and tomcat5w.exe and installed as service with exact same way... so it makes no sense whatsoever....

Why does memory increase past the 1024mb mark need to be in precise 24 mb increments?
and why is there a different "wall", with the LOWER spec'd machine able to reach much higher (1600mb) than the higher spec'd one with more ram (~1200)

I read something about JVM needing contingious memory but this is just nuts and doesn't make any sense whatsoever
What is the error when it does not start up?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.