Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 3 Nächste Version anzeigen »

globe with meridians Language: Deutsch · English

open book Tomcat administration

Operate and tune Tomcat for Nuclos – VM parameters, Windows service, NIO connector, HTTPS, manager deployment and more.

REFERENZ ADMINISTRATOR UPDATED: JUL 2026 APPLIES TO NUCLOS 4.2026.X

On this page

This page bundles advanced Tomcat topics for performance and operation. In a Nuclos installation Tomcat is located under <nuclos>/tomcat/apache-tomcat-<version>.

Java VM start parameters

The VM parameters control heap and GC (performance tuning, avoiding OutOfMemoryError). On 32-bit systems set -Xmx to at most 1536m. Easiest via a setenv.sh (Linux) or setenv.bat (Windows) file in the bin directory:

# Created by Thomas Pasch 
# see catalina.sh for explanation 
JAVA_OPTS="" 
CATALINA_OPTS="-server -ea -XX:PermSize=128M -XX:MaxPermSize=256M -XX:+UseThreadPriorities -Xmx1236m -Xms512m -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -XX:+TraceClassUnloading" 

# http://www.theserverside.com/discussions/thread.tss?thread_id=63241 
#-Xloggc:$CATALINA_HOME/logs/gc.log or Xloggc:%CATALINA_HOME%/logs/gc.log 
#-XX:+PrintHeapAtGC 
#-XX:+PrintGCDetails 
#-XX:+PrintGCTimeStamps 
#-XX:-HeapDumpOnOutOfMemoryError 
#-XX:+UseConcMarkSweepGC 
#-XX:-TraceClassUnloading 
# http://stackoverflow.com/questions/202502/appropriate-tomcat-5-5-start-up-parameters-to-tune-jvm-for-extremely-high-demand 
# http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136373.html 
# http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html 

Windows service

setenv.bat does not apply to the Windows service – see below. The installer deletes an existing setenv.bat; it must be placed again after re-installing.

Adjusting the Windows service

The VM parameters of the installed service are set via a script. Set start/max heap only via --JvmMs/--JvmMx (not additionally via -Xms/-Xmx, else they are passed twice). The JMX parameters are required to monitor the server process with jvisualvm (see memory image):

Fehler beim Rendern des Makros 'code': Ungültiger Wert für den Parameter 'com.atlassian.confluence.ext.code.render.InvalidValueException'
set CATALINA_HOME=C:\Nuclos3.6\tomcat\apache-tomcat-7.0.28 
set CATALINA_BASE=%CATALINA_HOME% 
set JAVA_HOME=C:\Program Files\Java\jre6 
C:\Nuclos3.6\bin\nuclosx64.exe //US//nuclos.nuclos --JvmOptions "-Dcom.sun.management.jmxremote.port=30333#-Dcom.sun.management.jmxremote.ssl=false#-Dcom.sun.management.jmxremote.authenticate=false#-Dcatalina.base=%CATALINA_BASE%#-Dcatalina.home=%CATALINA_HOME%#-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed#-Djava.io.tmpdir=%CATALINA_BASE%\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties#-ea#-XX:PermSize=128M#-XX:MaxPermSize=256M#-XX:+UseThreadPriorities#-XX:+PrintGCTimeStamps#-XX:+HeapDumpOnOutOfMemoryError#-XX:+TraceClassUnloading" --JvmMs=512m --JvmMx=2048m --StartMode=jvm --StopMode=jvm --Startup=manual --Classpath "%JAVA_HOME%/lib/tools.jar;%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_HOME%\bin\tomcat-juli.jar" --StartClass=org.apache.catalina.startup.Bootstrap --StartParams=start --StopClass=org.apache.catalina.startup.Bootstrap --StopParams=stop

Caution

Test VM parameters first: if -Xmx is too large the service won't start – and may not stop either (reboot needed).

NIO connector

In conf/server.xml switch the protocol to the NIO connector (better performance):

<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
    connectionTimeout="20000" redirectPort="8443" />

HTTPS (SSL/TLS)

Create a keystore and configure the connector:

keytool -genkeypair -keystore .keystore -alias mykey -storepass storepw -keypass keypw
<Connector SSLEnabled="true" clientAuth="false"
    keystoreFile="/path/.keystore" keystorePass="storepw"
    keyPass="keypw" keyAlias="mykey" maxThreads="150"
    port="8443" protocol="HTTP/1.1" scheme="https" secure="true"
    sslProtocol="TLS"/>

Installer note

The installer sets up HTTPS in server.xml but sets no keyPass – add it manually afterwards for a non-empty key password. Certificate details: SSL encryption.

WAR deployment via the manager

The Tomcat manager allows deploying WARs (also remotely). Adjust tomcat-users.xml in CATALINA_BASE/conf:

<tomcat-users>
        <role rolename="manager-gui"/>
        <role rolename="manager-script"/>
        <role rolename="manager-jmx"/>
        <role rolename="manager-status"/>
        <role rolename="admin-gui"/>
        <role rolename="admin-script"/>
        <user password="nuclos" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script" username="nuclos"/>
</tomcat-users>

Since the Nuclos WARs are large, increase max-file-size (and possibly max-request-size) in CATALINA_HOME/webapps/manager/WEB-INF/web.xml.

More

  • Tomcat Native/APR: for optimal production performance.
  • Multiple instances: via separate CATALINA_HOME and CATALINA_BASE.
  • Access log / valves / servlet filters: extended logging (response time, response length, SSL handshake …).

Related pages

gear Configuring Nuclos for high user load


Scaling.

Open →

gear SSL encryption


SSL.

Open →

  • Keine Stichwörter