0
votes

I am developing web application useing Java/J2EE. when i deployed that application in server it runs for two days after that tomcat automatically stops and print this error message and also if don't access that application for 1 day.Could any help me to solve this issue.

I have set heap size -Xms1024M -Xmx1536M -XX:MaxPermSize=1024M'

There is insufficient memory for the Java Runtime Environment to continue. Native memory allocation (malloc) failed to allocate 32776 bytes for Chunk::new An error report file with more information is saved as: /usr/local/apache-tomcat-7.0.53/bin/hs_err_pid15512.log

1
which may be the case that your code may be using a lot of memory. have you thought of scanning your code for performance issue using say profiling. its not that server is problematic may be your code is the real problem - vikeng21
max perm size of 1gb seems a bit excessive too; if there really is a need for it to be that high that may already be an indicator that there is something not right. - Gimby
Do a profiling of your applications memory consumption. There is most likely a memory leak in your code. - Uwe Plonus

1 Answers

0
votes

It would be good to at least go to the directory where it's saving the error reports, in this case, /usr/local/apache-tomcat-7.0.53/bin/hs_err_pid15512.log. I would suggest reading what the report says because if it says something about running out of memory in 32 bit mode, try and get a 64 bit jvm to fix the problem. If the first doesn't work, then go to your eclipse.ini file and edit you heap sizes to like 2gbs, which gives more memory to the jvm to run. But it could only be temporary.