wiremock-docker icon indicating copy to clipboard operation
wiremock-docker copied to clipboard

Out of Memory error in thread Connector-Scheduler

Open adeete-zeotap opened this issue 3 years ago • 2 comments

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.

Screenshot 2022-05-25 at 9 37 04 PM

How to troubleshoot such issues and get more information to trace the cause of this error? Am i missing some config required?

adeete-zeotap avatar Jun 13 '22 14:06 adeete-zeotap

Did you try to grow JVM allocated memory with JAVA_OPTS ?

rodolpheche avatar Jun 16 '22 17:06 rodolpheche

We bumped the memory to 4GB, though it did not help. We are attempting to serve up max ~10KB file

adeete-zeotap avatar Jun 27 '22 09:06 adeete-zeotap

Do you still have this issue ?

rodolpheche avatar Nov 10 '22 15:11 rodolpheche