tomcat common problem solving

1. Memory overflow:

The system pops up the setting tomcat configuration page, append the VM arguments in the parameters added at the end of Argument:

-Xms256M -Xmx512M -XX:PermSize=256m -XX:MaxPermSize=512m

parameter:

- vmargs: Description followed by the parameters of the VM 
 - Xms40m: The minimum memory occupied by the virtual machine of the system 
 - Xmx256m: The maximum memory occupied by the virtual machine of the system 
 - XX: PermSize: The minimum stack memory size. Generally, when the memory is insufficient, it is said that this is too small, and the remaining heap space is less than 5% , and a warning will be issued. It is recommended to set this slightly larger, but it should be set according to the memory size of your own machine. 
 - XX:MaxPermSize: Maximum stack memory size. This is also appropriately larger 
 - 5% of Xmx512M is 25.6M. In theory, the value of -Xmx and -XX:MaxPermSize must be greater than 25.6M

 

2. Faster startup

<Host appBase="webapps" autoDeploy="false" deployOnStartup="false" name="localhost" unpackWARs="true">

Line 116 of server.xml under Servers is commented out

 

3. Solve the garbled code of get request

Change line 64 of server.xml under Servers to URIEncoding="utf-8" 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324773565&siteId=291194637