outofMemory: java heap space

I’m trying to view an object an entity and from time to time, I keep getting a Java Heap space issue. In the browse screen, there’s only about 50 objects.
I’m attaching the log file. Do you think I need to mess with the catalina.sh file to increase memory? Thanks.

app.zip (27.6K)

I was able to resolve this issue by making a change in the tomcat\bin\setenv.bat file.
Changed -Xmx512m to -Xmx1536m

Hi Francis,
Be careful with increasing the heap size - it can be a temporary solution and OOM can happen later anyway if there is a memory leak. It can help only if you are sure that you load massive chunks of data into memory, or you have many concurrent users.
I would suggest adding -XX:-HeapDumpOnOutOfMemoryError option to setenv.* (or Tomcat service config), and investigate the heap dump after OOM using Eclipse Memory Analyzer.
For the option explanation see Java HotSpot VM Options

Hi Francis

I came across to memory leak issues when i hosted basic one entity cuba platform in hosting provider.
I use dailyrazor to host my java application, and i have basic hosting plan with 98MB heap size memory.

When i upload war file whether single war file or two war files, I am getting the following error message and i dont have access to tomcat setevn file as well. I am wondering what is the minimum heap size require to request my hosting company to upgrade heap size memory.

Thanks

logfile.txt (4.4K)

I think 98M is too little for any application. Try to monitor heap memory usage in you development environment - start your app from Studio and open Administration > Performance Statistics. Probably the heap should be not less than 200M.

A post was split to a new topic: HSQLDB connection error OutOfMemory