wiremock / wiremock-docker

Wiremock Docker image
https://hub.docker.com/r/wiremock/wiremock
MIT License
211 stars 99 forks source link

Out of Memory error in thread Connector-Scheduler #52

Closed adeete-zeotap closed 1 year ago

adeete-zeotap commented 2 years ago

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?

rodolpheche commented 2 years ago

Did you try to grow JVM allocated memory with JAVA_OPTS ?

adeete-zeotap commented 2 years ago

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

rodolpheche commented 1 year ago

Do you still have this issue ?