How can I increase memory in my application server?

From Wiki

Jump to: navigation, search


To increase memory in the application server you have to change the memory options in the related configuration file. Let's see how to change these options for the two main application servers supported.

Tomcat

You have to change the values in the CATALINA_OPTS option defined in the Tomcat Catalina start file. To increase the PermGen memory change the value of the MaxPermSize variable, otherwise change the value of the Xmx variable. For the Tomcat installed with the WebRatio tool the CATALINA_OPTS option is already present and you only have to change the variables values. Otherwise you have to add the declaration at the top of the file.

  • If you are using a Windows Operating System you have to open the "Catalina.bat" file placed in the "bin" directory. You have to apply the changes to this line
    set CATALINA_OPTS=-server -Xmx384m -XX:MaxPermSize=192m
  • If you are using a Linux or a Mac Operating System you have to open the "Catalina.sh" file placed in the "bin" directory. You have to apply the changes to this line
    CATALINA_OPTS="-server -Xmx384m -XX:MaxPermSize=192m"

Resin

You have to open the "wrapper.pl" file placed in the "bin" folder and change the $RESIN_ARGS variable in the following way. The value of the variables are only an example, you can change them as you want.
$RESIN_ARGS="-J-mx512m -J-XX:MaxPermSize=128m"

NOTE: Each time you generate a Web application using WebRatio, the usage of the application server PermGen memory increases. This is due to the fact that the application server does not free the unused memory. So it's possible that after several redeployments of a Web application you get an OutOfMemoryError. In this case it's not useful to further increase the memory in the configuration file of the application server, but it's enough to restart it.


Related articles:
Category Difficulty Refers
Avoiding Persistent Tomcat Sessions Deployment Beginner Web Application
Can I integrate a manually written JSP page in a WebRatio application? Integration Advanced Web Application
Debugging with application's logs Web Model Intermediate Web Application
How can I configure runtime properties (e.g. upload directory)? Deployment Beginner Web Application
How can I increase memory in my application server? Deployment Beginner Web Application
… further results












Personal tools