Skip to content
Snippets Groups Projects
Commit 1617db38 authored by Vincent Massol's avatar Vincent Massol
Browse files

XDOCKER-92: Cannot override the JVM memory

parent 9e85f453
No related branches found
No related tags found
No related merge requests found
......@@ -25,4 +25,30 @@
# http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10. We want to allow for them as it's useful to
# be able to have '/' and '' in wiki page names.
# * On some system /dev/random is slow to init leading to a slow Tomcat and thus Xwiki startup.
export CATALINA_OPTS="-Xmx1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dsecurerandom.source=file:/dev/urandom"
# Users can override these values by setting the JAVA_OPTS environment variable. For example:
# -e JAVA_OPTS="-Xmx2048m"
XMX="-Xmx1024m"
ALLOW_ENCODED_SLASH="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
ALLOW_BACKSLASH="-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
SECURERANDOM="-Dsecurerandom.source=file:/dev/urandom"
if [[ ! -z "$JAVA_OPTS" ]]; then
if [[ ! $JAVA_OPTS =~ .*-Xmx[0-9]+.* ]]; then
JAVA_OPTS="$JAVA_OPTS $XMX"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_ENCODED_SLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_ENCODED_SLASH"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_BACKSLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_BACKSLASH"
fi
if [[ ! $JAVA_OPTS =~ .*securerandom\.source.* ]]; then
JAVA_OPTS="$JAVA_OPTS $SECURERANDOM"
fi
else
JAVA_OPTS="$XMX $ALLOW_ENCODED_SLASH $ALLOW_BACKSLASH $SECURERANDOM"
fi
export JAVA_OPTS
......@@ -25,4 +25,30 @@
# http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10. We want to allow for them as it's useful to
# be able to have '/' and '' in wiki page names.
# * On some system /dev/random is slow to init leading to a slow Tomcat and thus Xwiki startup.
export CATALINA_OPTS="-Xmx1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dsecurerandom.source=file:/dev/urandom"
# Users can override these values by setting the JAVA_OPTS environment variable. For example:
# -e JAVA_OPTS="-Xmx2048m"
XMX="-Xmx1024m"
ALLOW_ENCODED_SLASH="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
ALLOW_BACKSLASH="-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
SECURERANDOM="-Dsecurerandom.source=file:/dev/urandom"
if [[ ! -z "$JAVA_OPTS" ]]; then
if [[ ! $JAVA_OPTS =~ .*-Xmx[0-9]+.* ]]; then
JAVA_OPTS="$JAVA_OPTS $XMX"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_ENCODED_SLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_ENCODED_SLASH"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_BACKSLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_BACKSLASH"
fi
if [[ ! $JAVA_OPTS =~ .*securerandom\.source.* ]]; then
JAVA_OPTS="$JAVA_OPTS $SECURERANDOM"
fi
else
JAVA_OPTS="$XMX $ALLOW_ENCODED_SLASH $ALLOW_BACKSLASH $SECURERANDOM"
fi
export JAVA_OPTS
......@@ -25,4 +25,30 @@
# http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10. We want to allow for them as it's useful to
# be able to have '/' and '' in wiki page names.
# * On some system /dev/random is slow to init leading to a slow Tomcat and thus Xwiki startup.
export CATALINA_OPTS="-Xmx1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dsecurerandom.source=file:/dev/urandom"
# Users can override these values by setting the JAVA_OPTS environment variable. For example:
# -e JAVA_OPTS="-Xmx2048m"
XMX="-Xmx1024m"
ALLOW_ENCODED_SLASH="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
ALLOW_BACKSLASH="-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
SECURERANDOM="-Dsecurerandom.source=file:/dev/urandom"
if [[ ! -z "$JAVA_OPTS" ]]; then
if [[ ! $JAVA_OPTS =~ .*-Xmx[0-9]+.* ]]; then
JAVA_OPTS="$JAVA_OPTS $XMX"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_ENCODED_SLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_ENCODED_SLASH"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_BACKSLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_BACKSLASH"
fi
if [[ ! $JAVA_OPTS =~ .*securerandom\.source.* ]]; then
JAVA_OPTS="$JAVA_OPTS $SECURERANDOM"
fi
else
JAVA_OPTS="$XMX $ALLOW_ENCODED_SLASH $ALLOW_BACKSLASH $SECURERANDOM"
fi
export JAVA_OPTS
......@@ -25,4 +25,30 @@
# http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10. We want to allow for them as it's useful to
# be able to have '/' and '' in wiki page names.
# * On some system /dev/random is slow to init leading to a slow Tomcat and thus Xwiki startup.
export CATALINA_OPTS="-Xmx1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dsecurerandom.source=file:/dev/urandom"
# Users can override these values by setting the JAVA_OPTS environment variable. For example:
# -e JAVA_OPTS="-Xmx2048m"
XMX="-Xmx1024m"
ALLOW_ENCODED_SLASH="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
ALLOW_BACKSLASH="-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
SECURERANDOM="-Dsecurerandom.source=file:/dev/urandom"
if [[ ! -z "$JAVA_OPTS" ]]; then
if [[ ! $JAVA_OPTS =~ .*-Xmx[0-9]+.* ]]; then
JAVA_OPTS="$JAVA_OPTS $XMX"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_ENCODED_SLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_ENCODED_SLASH"
fi
if [[ ! $JAVA_OPTS =~ .*ALLOW_BACKSLASH.* ]]; then
JAVA_OPTS="$JAVA_OPTS $ALLOW_BACKSLASH"
fi
if [[ ! $JAVA_OPTS =~ .*securerandom\.source.* ]]; then
JAVA_OPTS="$JAVA_OPTS $SECURERANDOM"
fi
else
JAVA_OPTS="$XMX $ALLOW_ENCODED_SLASH $ALLOW_BACKSLASH $SECURERANDOM"
fi
export JAVA_OPTS
......@@ -25,4 +25,30 @@
# http://tomcat.apache.org/security-6.html#Fixed_in_Apache_Tomcat_6.0.10. We want to allow for them as it's useful to
# be able to have '/' and '\' in wiki page names.
# * On some system /dev/random is slow to init leading to a slow Tomcat and thus Xwiki startup.
export CATALINA_OPTS="-Xmx1024m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true -Dsecurerandom.source=file:/dev/urandom"
# Users can override these values by setting the JAVA_OPTS environment variable. For example:
# -e JAVA_OPTS="-Xmx2048m"
XMX="-Xmx1024m"
ALLOW_ENCODED_SLASH="-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"
ALLOW_BACKSLASH="-Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"
SECURERANDOM="-Dsecurerandom.source=file:/dev/urandom"
if [[ ! -z "\$JAVA_OPTS" ]]; then
if [[ ! \$JAVA_OPTS =~ .*-Xmx[0-9]+.* ]]; then
JAVA_OPTS="\$JAVA_OPTS \$XMX"
fi
if [[ ! \$JAVA_OPTS =~ .*ALLOW_ENCODED_SLASH.* ]]; then
JAVA_OPTS="\$JAVA_OPTS \$ALLOW_ENCODED_SLASH"
fi
if [[ ! \$JAVA_OPTS =~ .*ALLOW_BACKSLASH.* ]]; then
JAVA_OPTS="\$JAVA_OPTS \$ALLOW_BACKSLASH"
fi
if [[ ! \$JAVA_OPTS =~ .*securerandom\\.source.* ]]; then
JAVA_OPTS="\$JAVA_OPTS \$SECURERANDOM"
fi
else
JAVA_OPTS="\$XMX \$ALLOW_ENCODED_SLASH \$ALLOW_BACKSLASH \$SECURERANDOM"
fi
export JAVA_OPTS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.