Recently, When I deployed a project on Tomcat, I found that the project had never been started. I checked the logs and found that the data sent from the front end to the backend was normal, and the data was returned to the front end the day after tomorrow.
In addition, the front-end returns a permgen space out of memory error, and then finds that tomcat has insufficient memory.
Tomcat Memory leakage mainly exists in three forms:
1. java. lang. outofmemoryerror: Java heap space --- JVM heap (HEAP) overflow the VM automatically sets the heap size at startup. The initial value is 1/64 of the physical memory. java. lang. outofmemoryerror: permgen space indicates the permanent storage area of the memory. This memory mainly stores class and meta information. When the class is loaded, it is placed in the permgen space area, which is different from the heap area where the instance is stored, sun's GC will not clean up the permgen space during the main program running. Therefore, if your app loads many classes, the permgen space overflow error may occur. 3. java. lang. stackoverflowerror -- stack overflow indicates that there are too many layers of function calls. Java memory java_opts Parameter Setting Description java_opts = "-server-xms2018m-xmx2048m-xss521k"-Server: must be the first parameter. When multiple CPUs are used, the optimal performance is-XMS: Minimum Memory Used by the initial heap size-xmx: maximum memory used by the heap-XX: permsize: set the permanent storage area of the memory-XX: maxpermsize: set the permanent storage area of the maximum memory-XSS 15120. This causes the JBoss to consume 15 MB of memory at the time of modification in Catalina under the bin of Tomcat every time a thread is added. add java_opts = ''-server-xms512m-xmx1024m-XX: persize = 512 M-XX: maxpermsize = 1024 M" to cygwin = false in Sh"
Tomcat memory overflow