JConsole: java.lang.OutofMemoryError: during event dispatching

671 views Asked by At

I have ran the performance test of my java application for two days and monitored through JConsole. However After the test ran for a day; JConsole output window reports OutOfMemoryError and JConsole hangup.

Q1) Is it becasue of my application OR Jconsole problem?
Q2) How to resolve this ? Is there any way to increase the HEAP memory of JConsole?
Q3) If it is due to long run then how can i set time range to disconnect the remote connection after sometime (not closing/killing)?

Please help.

enter image description here

enter image description here

1

There are 1 answers

6
Paul Hicks On

That stack trace makes it pretty obvious that JConsole is running out of memory when setting text to the window.

Unfortunately there's no command line options to configure that. There may be an MBean in JConsole that allows you to configure it, but I'd guess that there isn't.

Your alternatives are

  1. to close the console output, and just open it when you need it, or
  2. to redirect your application's stdout and stderr to files, so that the console output never has anything in it.