This article is not up to date and it has been substitute with new up to date content.

Please look the new up to date content.

How can I increase memory in my application server?

by Alberto Molinaroli
2,285 views Published on Oct 24, 2011
Applies to: All versions
Table of contents

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="$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.

 
 

This article is not up to date and it has been substitute with new up to date content.

Please look the new up to date content.