arjunarajan
asked on
Java heap memory error
hi
SEVERE: Caught exception (java.lang.OutOfMemoryErro r: Java heap space) executing org.apache.jk.common.Socke tConnectio n@1906e61, terminating thread
my web application runs well for full day. when it comes to peak hours its suddenly crashes with java heap memory error and totally hangs.
i use java 1.4, tomcat 5.5, mysql 5.
Once i restart tomcat mean its work fine.
Why this happen in regular. anyone kindly help me to sort out.
My system Memory is 1GB.
Thanks in Advance
SEVERE: Caught exception (java.lang.OutOfMemoryErro
my web application runs well for full day. when it comes to peak hours its suddenly crashes with java heap memory error and totally hangs.
i use java 1.4, tomcat 5.5, mysql 5.
Once i restart tomcat mean its work fine.
Why this happen in regular. anyone kindly help me to sort out.
My system Memory is 1GB.
Thanks in Advance
Please post code which is using socket connection.
>>My system Memory is 1GB.
whats your heap setting?
whats your heap setting?
ASKER
my heap setting 256MB for JVM.
When at peak hours 150 t0 200 users can access the site and application continously
When at peak hours 150 t0 200 users can access the site and application continously
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
how to set JVM memory, i dont know as im new to JVM side.
i hope its a JVM problem ly as the application run for past two years it works fine but now the hits is increase only from one month i phase this issue.
i want to know how to set JVM memory in linux and windows. and where i find that value.
kindly guide me
i hope its a JVM problem ly as the application run for past two years it works fine but now the hits is increase only from one month i phase this issue.
i want to know how to set JVM memory in linux and windows. and where i find that value.
kindly guide me
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thats ok to set.. how i know before value that JVM uses...
>>how i know before value that JVM uses...
you have told 256MB is set already!
you have told 256MB is set already!
ASKER
ya that my server maintain people said.... i want to check mean.. any commands r any other tool identify that ya....
check the catalina.sh/bat file, they should have configured the heap settings there!
also checo if there are any env variable JAVA_OPTS defined that has heap settings!
also checo if there are any env variable JAVA_OPTS defined that has heap settings!
ASKER
i checked u said files i didn't find anything like that .
we have a dedicated linux server. i want to cross check whether they set java heap memory or not. say where i can see that value.
we have a dedicated linux server. i want to cross check whether they set java heap memory or not. say where i can see that value.
ASKER
I finally fixed the problem by increasing the system memory.
increasing the system memory can not fix the issue, no matter how much memory your system has but JVM can use only what allocated for it. the only way to increase the memory for JVM is through the env variables like -Xms, -Xmx which I have asked him to do so earlier!
I recommend the below commentids to be accepted as answer,
ID:24743686
ID:24743714
ID:24743686
ID:24743714