Seeing this pile of information, I think you should know what to do.
Main at
java.lang.outofmemoryerror.<init> () V (outofmemoryerror.java:48)
at Java.util.Arrays.copyOfRange ([CII) [C (arrays.java:2694) at
java.lang.string.<init> ([CII) V (String.java : 203) at
java.lang.StringBuilder.toString () ljava/lang/string; (stringbuilder.java:405)
At Com.mkk.utils.GuidGeneratorTest.outOfMemory () V (guidgeneratortest.java:25) at
Sun.reflect.NativeMethodAccessorImpl.invoke0 (Ljava/lang/reflect/method; Ljava/lang/object; [Ljava/lang/object;) Ljava/lang/object; (Native method)
At Sun.reflect.NativeMethodAccessorImpl.invoke (ljava/lang/object;[ Ljava/lang/object;) Ljava/lang/object; (nativemethodaccessorimpl.java:57)
At Sun.reflect.DelegatingMethodAccessorImpl.invoke (ljava/lang/object;[ Ljava/lang/object;) Ljava/lang/object; (delegatingmethodaccessorimpl.java:43)
At Java.lang.reflect.Method.invoke (ljava/lang/object;[ Ljava/lang/object;) Ljava/lang/object; (method.java:601)
Increased memory, increased memory, memory overflow, so I set the
java_opts=-server-xms2048m-xmx2048m-xx:permsize=1024m-xx:maxpermsize=512m-xss512k
Reboot the server, not too long and outofmemoryerror
It's time to know the damn outofmemoryerror,
So, please add to java_opts
-xx:+heapdumponoutofmemoryerror-xx:heapdumppath=/home/error
(Note: The red section is a path to the server, and when OutOfMemoryError is the JVM information is stored in the directory)
Restart the server again, look forward to the next OutOfMemoryError bar.
Yes, OutOfMemoryError again ...
Now, let's go to the/home/error catalogue. Is there a file generation similar to Java_pid6472.hprof, still large (good dozens of or hundreds of MB).
Now, it is recommended to download the mat (Memory Analyzer Tool) tool to see what stuff is running out of memory (and the Jvisualvm.exe tools that are available with JDK). Download Address:
http://www.eclipse.org/mat/downloads.php
Finally, find the source. To modify the code.