Article directory
Brief description of the problem
In the past, the project started fine without any problems, but recently it reported an error:
java.lang.OutOfMemoryError: ...(此处忽略) GC overhead limit exceeded
problem analysis
The error occurs during the compilation phase, not the runtime phase. Through querying relevant information, we found that
- The virtual machine used by idea to compile Java projects and the virtual machine used by idea software itself are separate (that is, independent processes)
- You only need to add memory to the virtual machine used by the compiler to solve the problem
solution
Solution one
Solution 2
The above operation still could not solve my problem, so I broke the point near the log printed before the error was reported, and debugged step by step. I found that when the project started, it was necessary to read data from the database into the cache. There were about 100,000 pieces of statistical data. , and the vm option of tomcat I set is:
-Xms25m
-Xmx25m
I suspect that the value may be too small, so set it to
-Xms2048m
-Xmx2048m
This problem was successfully solved after