...
- Add the following parameters to the
JAVA_OPTS
environment variable (all ### is the amount of memory in megabytes to allow for the option):- -Xmx###mXmx1500m - this is the maximum amount of memory that Tomcat may use, at least 1.5G is recommended for larger (>25M) metadata files
- -XX:MaxPermSize=128m - (Oracle Java 6/7 specific option) the maximum amount of memory allowed for the permanent generation object space
- Edit the .../glassfish/domains/domain1/config/domain.xml and make equivalent changes in the <java-config> sections using <jvm-options> tags
- Limit the allowed size of POST submissions to any HTTP connectors. A size of 100K (100000) is a reasonable choice. It is unknown how this is actually accomplished, please refer to the Glassfish documentation.
...