Hello Team, We are running our WireMock server in...
# help
d
Hello Team, We are running our WireMock server in a docker image with the below start up params - env: - name: ARGS value: --port 10080 --bind-address 0.0.0.0 --local-response-templating --jetty-header-request-size 2097152 --max-request-journal-entries 2000 --jetty-header-response-size 2097152 --disable-response-templating --container-threads 250 --enable-browser-proxying --disable-response-templating --trust-all-proxy-targets --ca-keystore /var/wiremock/lib/ca-keystore.jks When we record Wiremock transactions in a minimum level it works as expected. When I try to run a specific use case where it generates 500+ mocks immediately I see immediate memory spike in my wiremock server and it ends up in OutOfMemory error . Is there anything that I need to fine tune the start up params to handle this load in Wiremock.
r
Request journal entries & stubs are both held in memory. So when you record each request / response is in memory twice, once as an entry in the request journal, once as a stub, since the stub will match on the entire request body and return the entire response body. It sounds like you have some fairly large request / response pairs, so you need more memory. Try bumping the container's memory up and adding an env
JAVA_OPTS
with value
-XX:MaxRAMPercentage=90
or similar.
(Have you rolled your own Dockerfile? I think the
wiremock/wiremock
docker image expects an env var
WIREMOCK_OPTIONS
rather than
ARGS
for setting options.)