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.
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.