Cause of the problem
Booting the project through Tomcat may be because the project is too large and the configured memory is not enough. The problem of memory overflow is always reported.
Solutions
1. Select the project right-click Run as-"run configurations ...
2. The Tomcat configuration page appears. Select the Tomcat-"arguments-" you want to modify to add the following code in the box (how much to set according to the actual project situation)
(-xms1024m-xmx2048m-xx:maxpermsize=1024m)
3. After you save the restart, the project will run normally.
4. Supplement
- -vmargs-xms128m-xmx512m-xx:permsize=64m-xx:maxpermsize=128m
- -vmargs: description is followed by the parameters of the VM, so the following are actually the parameters of the JVM
- -xms128m: Heap memory initially allocated by the JVM
- -xmx512m: JVM Maximum allowable allocated heap memory, on demand
- -xx:permsize=64m: Non-heap memory initially allocated by the JVM
- -xx:maxpermsize=128m: JVM maximum allowable allocated non-heap memory, on demand
When Tomcat starts, memory overflows, Exception:java.lang.OutOfMemoryError thrown from the Uncaughtexceptionhandler in thread "main"