OHDSI Home | Forums | Wiki | Github

Java heap size for tomcat

We are getting the following errors showing in webapi.log :
2022-12-14 10:45:03.773 ERROR taskExecutor-1 org.springframework.batch.core.step.AbstractStep - [] - Encountered an error executing step warming cache: OMOP achilles in job warming cache: OMOP
java.lang.OutOfMemoryError: Java heap space

Any idea of how to correct this ?

I added the following line in the docker environment file to increase memory allocation from the default settings for various OOM errors I encountered. Obviously you’d want to use settings appropriate for your server capacity.

CATALINA_OPTS="-Xms1G -Xmx10G -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"

In the Docker log look for the following lines to confirm:

broadsea-webtools2 | 13-Dec-2022 17:26:42.138 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1G
broadsea-webtools2 | 13-Dec-2022 17:26:42.138 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx10G

t