You may wish to change the default Java heap size depending on the way you deploy Callimachus. A Java heap size that is too small for your Callimachus configuration can result in "Out of Memory" (OOM) errors and a server crash.

Callimachus ships with a default maximum heap size configuration of 768 MB (-Xmx768m). That is sufficient for most small Callimachus configurations using a single deployment and possibly one additional RDF datasource.

Edit the etc/callimachus.conf file and change the JAVA_OPTS settings for the maximum heap size using the -Xmx option.

We recommend adding roughly 500 MB to the maximum heap size each time you add a deployment, realm or RDF datasource to Callimachus, up to a maximum of 2 GB (-Xmx2000m). Java running on 64-bit operating systems can use more than 2 GB of heap, but the overhead of handling large heap can slow Java virtual machine operations.

Note: Ensure that you leave adequate physical RAM for Java heap, database indexes and the operating system! For example, you might allocate 2 GB of RAM for Java heap, 1 GB of RAM for the operating system and 15 GB of RAM for database indexes to be kept in memory, for a total of 18 GB of RAM on the machine.

You may need to monitor the Java virtual machine to determine how it is performing given your particular configuration. One way to do that is via JConsole.

The default Callimachus configuration requests that the Java virtual machine dump its heap on an OOM error using the -XX:+HeapDumpOnOutOfMemoryError option. OOM errors are also reported in the location of STDOUT, generally the file etc/callimachus-stdout.log and the location of STDERR, generally the file etc/callimachus.log.0.