We are getting this error when OOM occurs and Dynatrace tries to generate Memory Dumps (Appmon 6.5):
2018-06-21 10:32:59  info [native] Creating Memory Dump upon ResourceExhausted Notification: unable to create new native thread
2018-06-21 10:32:59  info [native] Run Garbage Collector
2018-06-21 10:32:59  info [native] Connecting HeapDump-Writer
2018-06-21 10:32:59  warning [native] JvmtiExtendedHeap::HeapDump(): Could not connect to the server
2018-06-21 10:33:09  info [native] Shutting down Controller
It seems the agent could not connect to server when generating the memory dump.
Any clues? Thanks!
I am not quite sure about my answer, but I GUESS it is because the memory is so low that the agent can't even be loaded? (I am not quite sure what is the typical memory usage of OneAgent process, and neither can I think of any way to verify this.)