Here's a really useful reference: http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp*
*See the "debugging options" section toward the bottom. On Tue, Jun 23, 2009 at 9:15 AM, David Pollak <[email protected] > wrote: > Vassil & Erik -- lots of useful stuff in here... I wish I had know about > these options when I was debugging the Actors memory retention problems... > :-) > > On Tue, Jun 23, 2009 at 4:36 AM, Erik Engbrecht <[email protected] > >wrote: > > > -XX:+*HeapDumpOnOutOfMemoryError** **is also very useful for > post-mortems.* > > > > On Tue, Jun 23, 2009 at 2:46 AM, Vassil Dichev <[email protected]> > wrote: > > > > > > I added code that will dump memory information every 10 minutes. > > Please > > > put > > > > the new code live. If it barfs, please send me the output (privately > > is > > > > better so we don't spam the list with a 10MB file) > > > > I'm running an instance on my local box and will see if I can find > > memory > > > > leaks. > > > > > > This is cool, but I'm afraid we might need some extra info from the > > > JVM. I'm not sure you can change the command-line or environment you > > > use to start the application in Stax, but this should display detailed > > > information for the Sun JVM. > > > > > > MAVEN_OPTS=-verbose:gc -XX:+PrintGCDetails -XX:+PrintClassHistogram > > > > > > and for extra debugging, you can turn on the built in profiler with > > > the following options: > > > > > > -Xrunhprof:heap=sites,cpu=samples,doe=y > > > > > > It will make the JVM run even slower, but could really pinpoint where > > > the problem was. > > > > > > As for thread dumps, they're even more useful if you encounter the > > > 100% CPU issue, but we need to send a signal to the JVM, which I'm not > > > sure you can do at all in a managed stax environment. There are > > > solutions to trigger it programmatically, but you need to include a > > > native library, which is another restriction we might not be able to > > > overcome. > > > > > > All in all, it would be much better if we can reproduce it locally, > > > where we can play with the application. I assume you couldn't set > > > MAVEN_OPTS last time there was a problem, since there was no feedback. > > > Monitoring an app for memory problems in a restricted environment is > > > notoriously hard. > > > > > > Vassil > > > > > > > > > > > -- > > http://erikengbrecht.blogspot.com/ > > > > > > -- > Lift, the simply functional web framework http://liftweb.net > Beginning Scala http://www.apress.com/book/view/1430219890 > Follow me: http://twitter.com/dpp > Git some: http://github.com/dpp > -- http://erikengbrecht.blogspot.com/
