Production Server


We use the following settings for Tomcat on our production server (NixOS/Linux):




The most important setting, maximum heap space, value depends on size/number of applications, but the default setting is usually too low. If this setting is too high for your JVM, it won’t start at all.


This allows redeploying the application without running into permgenspace errors too quickly. 

The default implementation for random can be too slow (java.util.UUID.randomUUID is used for entity identifiers, including RequestLogEntry) see

Monitoring and Debugging

Use jvisualvm to inspect the Tomcat process, this allows you to look at the heap and running threads and create dumps for later inspection. A heap dump can also be created using:

jmap -F -dump:format=b,file=<filename> <process id>

The Eclipse Memory Analyzer can be used to inspect this file, get it from

If the tomcat process becomes unresponsive try

kill -3 <process id>

to generate a thread dump in the catalina.out log.


See MySQL section.

Lightweight VPS

See Lightweight VPS section, also contains step-by-step installation.

Production Server