https://kotlinlang.org logo
#random
Title
# random
n

napperley

04/21/2020, 2:49 AM
Encountered a bizarre issue the other day where the JVM crashed before the program fully started (after a power failure). Looks like the program is running out of memory (most likely heap memory), however the issue might be on the JVM side. Noticed when jps was being run that a pthread error message appeared (something about running out of memory), which was only resolved by terminating the java process before running jps again. What resources are available for memory profiling a JVM application? Is it possible to remotely profile a JVM application via SSH?
Here are the possible solutions mentioned in the log file that can be safely ruled out: • Reduce memory load on the system (average free memory is around 1.8 GB) • Increase physical memory or swap space (total memory is 4 GB, and a SSD is used therefore no swap partition is being used) • Check if swap backing store is full (no swap memory used) • Decrease number of Java threads (only Kotlin Coroutines are used) • Decrease Java thread stack sizes (only Kotlin Coroutines are used)
h

hallvard

04/21/2020, 6:51 AM
Visualvm permits remote debugging if you have the possibility to launch your jvm code on the server with some extras around it: https://docs.oracle.com/javase/8/docs/technotes/guides/visualvm/applications_remote.html
☝️ 1