...
Code Block | ||||
---|---|---|---|---|
| ||||
<Server port="8000" shutdown="SHUTDOWN" debug="0"> <Service name="Tomcat-Standalone"> <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="http" proxyName="your_domain.com127.0.0.1" proxyPort="80"/> <Engine name="Standalone" defaultHost="localhost" debug="0"> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"> <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"> <!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> <Manager pathname=""/> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> </Context> <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true"> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> </Context> </Host> </Engine> </Service> </Server> |
...
Code Block | ||
---|---|---|
| ||
* hard nofile 500000 * soft nofile 500000 root hard nofile 500000 root soft nofile 500000 |
Check point 3. Increasing max memory by modifying setenv.sh
One of the possibility is caused by memory limits. In my case, mx used the default value (1024m), so I changed its size to 2048m.
Below is my configuration at <confluence home directory>/bin/setenv.sh
Code Block | ||||
---|---|---|---|---|
| ||||
# Set the JVM arguments used to start Confluence. For a description of the options, see # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html CATALINA_OPTS="-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution ${CATALINA_OPTS}" CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}" CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}" CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}" CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}" # CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}" CATALINA_OPTS="-Xms1024m -Xmx2048m -XX:+UseG1GC ${CATALINA_OPTS}" CATALINA_OPTS="-Dsynchrony.enable.xhr.fallback=true ${CATALINA_OPTS}" CATALINA_OPTS="-Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 ${CATALINA_OPTS}" CATALINA_OPTS="-Djava.locale.providers=COMPAT,SPI ${CATALINA_OPTS}" CATALINA_OPTS="${START_CONFLUENCE_JAVA_OPTS} ${CATALINA_OPTS}" CATALINA_OPTS="-Dconfluence.context.path=${CONFLUENCE_CONTEXT_PATH} ${CATALINA_OPTS}" CATALINA_OPTS="-XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing ${CATALINA_OPTS}" |
Once your modification is done, you should restart your server to take effect.
Check point 4. Adding more memory to Synchrony
The default memory size for Synchrony is 1g, and below shows the memory is assigned by 2g. That should be added at the end of <confluence home directory>/bin/setenv.sh
Code Block | ||
---|---|---|
| ||
CATALINA_OPTS="-Dsynchrony.memory.max=2g ${CATALINA_OPTS}" |
Check point 5. Modifying a value of maxThreads.Connector in <confluence_home_directory>/conf/server.xml
...
Actually this approach is not recommended, because it could cause poor performance delay in GC(Garbage Collection) sometimes.
Nevertheless, if you still want, you You may able to see maxThread as a member of <Connector>. The default value of maxThreads is 48 - I just modified it to 4096
Code Block | ||
---|---|---|
| ||
<Server port="8000" shutdown="SHUTDOWN" debug="0"> <Service name="Tomcat-Standalone"> <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="4096" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="http" proxyName="your_domain.com" proxyPort="80"/> <Engine name="Standalone" defaultHost="localhost" debug="0"> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"> <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"> <!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> <Manager pathname=""/> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> </Context> <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true"> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/> </Context> </Host> </Engine> </Service> </Server> |
Once your modification is done, you should restart your server to take effect.
Check point 4. Increasing max memory by modifying setenv.sh
One of the possibility is caused by memory limits. In my case, mx used the default value (1024m), so I changed its size to 2048m.
Below is my configuration at <confluence home directory>/bin/setenv.sh
Code Block | ||||
---|---|---|---|---|
| ||||
# Set the JVM arguments used to start Confluence. For a description of the options, see
# http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
CATALINA_OPTS="-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution ${CATALINA_OPTS}"
CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}"
CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}"
CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}"
CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}"
# CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}"
CATALINA_OPTS="-Xms1024m -Xmx2048m -XX:+UseG1GC ${CATALINA_OPTS}"
CATALINA_OPTS="-Dsynchrony.enable.xhr.fallback=true ${CATALINA_OPTS}"
CATALINA_OPTS="-Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 ${CATALINA_OPTS}"
CATALINA_OPTS="-Djava.locale.providers=COMPAT,SPI ${CATALINA_OPTS}"
CATALINA_OPTS="${START_CONFLUENCE_JAVA_OPTS} ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.context.path=${CONFLUENCE_CONTEXT_PATH} ${CATALINA_OPTS}"
CATALINA_OPTS="-XX:ReservedCodeCacheSize=256m -XX:+UseCodeCacheFlushing ${CATALINA_OPTS}"
|
Once your modification is done, you should restart your server to take effect.
Check point 5. Adding more memory to Synchrony
The default memory size for Synchrony is 1g, and below shows the memory is assigned by 2g. That should be added at the end of <confluence home directory>/bin/setenv.sh
...
title | <confluence home directory>/bin/setenv.sh |
---|
...
Other approaches
https://confluence.atlassian.com/doc/troubleshooting-collaborative-editing-858772087.html