Out of Memory / Java Heap

1
Hi everybody, On the Mendix-hosted-env we have the problem that the Mendix-Portal sometimes gets very very slow. Opening the m2ee command, I get this message: ERROR: The application process seems to be running (pid 123456 is alive), but does not respond to administrative requests. ERROR: This could be caused by JVM Heap Space / Out of memory errors. Please review the application logfiles. ERROR: You should consider restarting the application process, because it is likely to be in an undetermined broken state right now. This problem seems to have been introduced just a few weeks ago, but I have no clue where to start the investigation. I have the feeling that it is introduced since we have a page for anonymous users (for the forgot password functionality) After a restart of the m2ee, things just run fine again... This problem only sometimes occurs (lets say once in 2 weeks?) and I cannot relate it to some "heavy process". I'd like to get some feedback on how this error can be resolved. Thanks in forward for your help!
asked
3 answers
5

If the affected application is the one I think it is... Yes, it's showing clear signs of memory leaks, possibly related to a process/microflow that's executing about 1 or 2 database retrieve per second, continuously, while retrieved objects are held captive in your process. After several days, you fill up all available memory and then 'computer says no'.

You can request monitoring graphs for this application to be made available to you by issuing a support request in the support portal, asking for it. (It's free!). You can also get (email-)alerts when your application is unexpectedly dying.

Besides that... Did you check the application log files? You don't mention them, and the m2ee error message suggests looking at the log file.

Edit: You could also ask (via a support ticket) for a short heap analysis to be done by Mendix. The acceptance test environment of this application is about to explode, so we could dump heap on it and see what type of objects are eating up your memory. You (obviously) need to ask for this and give permission. I don't know if you'll get this time for free, but you can always try to bribe the support department with 'pepernoten'. :)

answered
1

I had the same kind of errors once. Look at the answer of Michel in this post: out of memory errors

Start first by looking over your application if objects are created without being committed. Then these objects stay in memory and after a while you get out of memory errors. If nothing is found try Michel's sollution.

answered
0

Roberto, when you think some process could be responsible for the java heap, you could add log messages to your microflow and later check this by looking at the loglevels before the java heap error in your log. Otherwise it is very difficult to trace the real problem.

Does this occur on a specific time or maybe you could trace this back to a scheduled event or other microflow which could cause this issue.

answered