Envelope/Quill HelpMeIveRunOutOfMemory

- Last edited February 22, 2003
Ok so the unit tests didn't catch this one.

Anyone got any tips or suggestions for locating the cause of OutOfMemoryErrors? in Java.

'The Situation'

'Have tried' We do have a few core dumps I recieved when trying out the IBM 1.4VM but I don't know if there is any simple way of analyzing these.

Is there any way to actually see what is going on? We've made several 'best guess fixes' such as caching algorithms, xml parsing librarys etc,

Anyone had any good experiences with tools/techniques for actually discovering the cause of OutOfMemory? Errors

Is remote debugging a machine with a 400Meg OutOfMemory?'d VM still running going to help? I haven't tried this yet.

MpC


Have you tried reproducing it in a non-production environment using greatly reduced amounts of memory? Something like -Xmx32m? and a load-testing tool that hits all your pages repeatedly might reveal the problem. --AO

To a degree I tried this using WCAT but this was unrealistic and didn't reproduce the problem. I would need some kind of multithreaded/multimachine based apache log replayer to have much of a hope of reproducing a realistic load. Also, it does crash with drastically reduced memory (-Xmx64M?) but this is probably not due to the leak. I suspect with the cacheing enabled the app should require about 200MB if hit with a broad range of HTTP requests.--MpC

Try somthing like Grinder or Apache's JMeter. They can record someone using your application and then replay that user's actions back with varying levels of load and various random distributions. You can also try using these in combination with GCViewer, profile viewers like HP's (free) JMeter and create an environment where you can quickly trigger the error and record the situation. Links to all of these are available on: www.oshineye.com/courses/a11.html You could also try something like the Omniscient Debugger (www.lambdacs.com/debugger/debugger.html) if you're really desperate.--AO


I'd use a tool like JProbe and look for a count of classes that never gets garbage collected. -- OliBye
- Last edited February 22, 2003

https://casino-brain.com/