Out of Memory error in thread Connector-Scheduler
I have created a mock server with the following configuration.
DockerFile -
WORKDIR /config
COPY mappings /config/mappings
COPY __files /config/__files
ENV MOCKSERVER_MAPPINGS=/config/mappings
ENV MOCKSERVER_FILES=/config/__files
ENV JAVA_OPTS="-Xms512m -Xmx4g"
CMD ["--global-response-templating", "--max-template-cache-entries", "500"]
docker-compose.yml
services:
wiremock:
image: wiremock/wiremock:2.32.0-alpine
container_name: wiremock_demo
volumes:
- ${MOCKSERVER_FILES}:/home/wiremock/__files
- ${MOCKSERVER_MAPPINGS}:/home/wiremock/mappings
ports:
- 8443:8080
But, getting Out of Memory Error quite frequently. Earlier, it was happening on daily basis. But, after setting --max-template-cache-entries to 500, the frequency of this error has reduced.

How to troubleshoot such issues and get more information to trace the cause of this error? Am i missing some config required?
Did you try to grow JVM allocated memory with JAVA_OPTS ?
We bumped the memory to 4GB, though it did not help. We are attempting to serve up max ~10KB file
Do you still have this issue ?