Skip to content

Instantly share code, notes, and snippets.

@lesstif
Last active January 23, 2018 05:47
Show Gist options
  • Save lesstif/98dfb8c0eeae28e5edb1 to your computer and use it in GitHub Desktop.
Save lesstif/98dfb8c0eeae28e5edb1 to your computer and use it in GitHub Desktop.
tomcat setenv.sh
#!/bin/sh
MIN_MEMORY="384m"
# In larger webapps, the maximum amount will need to be increased.
MAX_MEMORY="768m"
# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems.
## support was removed in 8.0
MAX_PERM_SIZE="384m"
# This allows us to actually debug GC related issues by correlating timestamps with other parts of the application logs.
EXTRA_ARGS="-XX:+PrintGCDateStamps"
JAVA_OPTS="-Xms${MIN_MEMORY} -Xmx${MAX_MEMORY} ${EXTRA_ARGS} ${JAVA_OPTS}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment