Linux method for handling Tomcat exceptions

  
                

In Linux systems, if the program in tomcat is unstable, tomcat will report an exception. This is also a problem that often occurs with tomcat. This article will teach you Linux to deal with Tomcat exceptions.

a, PermGen space full name is the Permanent Generation space, refers to the memory of the permanent preservation areas OutOfMemoryError: PermGen space from the surface is a memory benefit, the solution must also be to increase the memory.

Why memory benefits:

This part is used to store Class and Meta information. Class is placed in the PermGen space area when it is loaded, and it stores the Heap area of ​​the Instance. Differently, the GC (Garbage Collection) does not clean up the PermGen space during the main program runtime, so if your app will LOAD a lot of CLASS, it is likely that a PermGen space error will occur. This type of error is common when the web server precompiles the JSP.

Correction method: -Xms256m -Xmx256m -XX:MaxNewSize=256m -XX:MaxPermSize=256m

Second, the outofmemory error occurs in redeploy in tomcat.

Error reason:

1, using proxool, because proxool contains an old version of cglib.

2, log4j, preferably not, only use common- Logging

3, the old version of cglib, hurry to update to the latest version.

4, updated to the latest hibernate3.2

The above is the Linux processing Tomcat exception tutorial, Tomcat exception is not a problem with Tomcat itself, if you check carefully, you will find The problem with the program content.

Copyright © Windows knowledge All Rights Reserved