Memory Leak problem



I am running Bonita 6.3.2 Community Edition, Tomcat 6, Java jre7. Sometimes, on the server, there's a spike in the CPU Usage. As a result, the system hangs. I'm not sure what could be the cause of this, however, based on my understanding of Tomcat, I believe Tomcat could be causing the memory leak. I have a task scheduler set to stop and start Tomcat on a daily basis. I thought this would fix the memory leak but it does not. Moreover, I've noticed that the bonita/temp folder takes up significant amount of space. Could this be the issue?

How can I find the cause of the memory leak?

1 answer

This one is the BEST answer!

The bonita/temp folder is a know issue and has (possibly) been fixed in later versions of the software. When you stop and restart the service I would also add a task to delete all files in this folder. It's perfectly safe to do so, if you're not sure, then take a backup and delete them.

I remember mine being over 5GB in size once and it was dreadful. Service wouldn't start as server simply ran out of disk space. Deleting fixed my problem.

Now onto memory - you problem above will not fix your memory problem and if you are using the default parameters then you may need to change them.

Also I'm not sure about your assertion:

however, based on my understanding of Tomcat, I believe Tomcat could be causing the memory leak

It's not really very's probably two other things that's causing the problem...

1) badly written code
2) not tuned JVM memory allocations

Both are difficult to fix without a JVM monitor running somewhere to see what is actually happening:

I would start here and possibly make changes to your memory allocations as well to find out what's going on:


PS: While I understand this may not be the answer you are looking for it does answer your question, please mark as resolved by ticking the tick mark on the left of this reply so others now it is closed.


Submitted by Michele.DuBose on Mon, 09/26/2016 - 17:03

Thank you Sean McP for this answer. I read the content of the links you've provided for changing the memory, however, based on the information, I'm not sure what my settings should be. It's not clear on whether they should be lower or higher.

Submitted by Sean McP on Tue, 09/27/2016 - 04:14

What we do is immediately double the amounts

so 512 becomes 1024, 1024 becomes 2048

That should do for a start, but to do better you need to monitor the system with the appropriate tools as already shown. How they are used is up to your IT department.


Submitted by Michele.DuBose on Tue, 09/27/2016 - 16:35

Thank you.