- Last edited February 22, 2003 |
Anyone got any tips or suggestions for locating the cause of OutOfMemoryErrors? in Java.
'The Situation'
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.
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
- Last edited February 22, 2003 |