Question: The following figure
Solution:
Adjusts tomcat initialization and maximizes memory data.
1. Query the local memory and usage, according to the actual situation to set, using the free command, according to B display, the following command by M and G respectively to display
According to the above see free only 1.7G available, and for some reason Tomcat set 4048M, so prompted the above error.
2. Modify CATALINA.SH Configuration
3. The java_opts value in the modification is:
Java_opts= "-server-xms512m-xmx1024m-xss1024k-xx:permsize=256m-xx:maxpermsize=512m"
4. Restart Tomcat.
./start.sh
Each parameter in the java_opts above explains:
-xms128m JVM Initial allocation of heap memory
-xmx512m JVM Maximum allowable allocation of heap memory, on demand
-xx:permsize=64m JVM Initial allocation of non-heap memory
-xx:maxpermsize=128m JVM Maximum allowable allocation of non heap memory, on demand