Hi everyone, Is there any way to clear up memory ...
# wiremock-java
r
Hi everyone, Is there any way to clear up memory through wiremock? We have a wiremock (standalone jar) setup with over 1000 mappings and used by multiple applications concurrently. We have a lot of response templating and state behaviour setup. The wiremock pod memory consumption is increasing gradually and pod is going down after some time. Need help on how to handle this issue. I used wiremock admin reset request but it didn't clear up any memory.
l
This is tricky to diagnose. Could you give a little more information about how you are running standalone: • What startup parameters are you using • Are you constraining the request log in any way • Are you using a
health
endpoint for WireMock in your environment and if so is that via a stub you have created or the official admin health endpoint?
r
Starting Wiremock with:
'/usr/lib/jvm/applejdk-11.0.8.10.4/bin/java  -Xms15360m -Xmx15360m -jar /wiremock/wiremock-*.jar  --global-response-templating --no-request-journal --disable-request-logging --container-threads=300 --max-template-cache-entries=500 --async-response-enabled=true --async-response-threads=100 --match-headers=Accept,Content-Type --port 9096'
@Lee Turner we are not using any
health
endpoint.
l
Awesome, thanks for the information. Do you have any custom extensions loaded or is it pretty vanilla WireMock?
r
We are not using any custom extensions.
l
Nice. Just for information, we have an issue reported along these lines so we have this on our radar already - https://github.com/wiremock/wiremock/issues/2731
r
Thanks @Lee Turner, please update here if we have any update.
l
Hi @Rakesh Priyatham, could I just ask, what stub features they’re using in your tests? I might be useful to know in case it’s a specific matcher or helper (or other feature) that’s leaking
Also, something to consider if this is causing issues for you and your team is WireMock Enterprise. Enterprise will remove some of the headaches of hosting and scaling your own WireMock instances as well as adding additional capabilities such as mock creation from openAPI spec, Chaos testing, contract testing and import data from CSV files - https://www.wiremock.io/comparison