This is not like you are running out of empty space, so do not increase it (option -Xmx). Instead, your application runs out of process memory, and reducing heap space frees up process memory for its own use. The question is why are you using so much process memory? If you are not using JNI, you probably created too many threads, and the habe message explained how to fix this.
source
share