4

I'm running a server with following command:

java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000 -server -jar -Dlog4j.configurationFile=properties/log4j2.xml myApp.jar

The server is running on the AWS cloud (EC2 small instance), and the port 8000 is open so that a debugger (IntelliJ, in my case) can connect to remote JVM via JDWP protocol.

The problem is that sometimes the server unexpectedly shuts down with following message:

JDWP exit error JVMTI_ERROR_OUT_OF_MEMORY(110): Can't allocate jvmti memory [:1797] 
FATAL ERROR in native method: JDWP Can't allocate jvmti memory, jvmtiError=JVMTI_ERROR_OUT_OF_MEMORY(110)
Aborted (core dumped)

It seems that the 'out of memory' error is related to JDWP, not the code.

I have seen JVMTI_ERROR_OUT_OF_MEMORY several times, but never seen java.lang.OutOfMemoryError from the application itself.

How can I resolve this jdwp error? Is disabling jdwp debugger the only way?

hylowaker
  • 966
  • 2
  • 9
  • 24

0 Answers0