Hi Team, We are using wiremock standalone jar, we...
# wiremock-java
r
Hi Team, We are using wiremock standalone jar, we have placed 3 mappings . We are continuously hitting stubed api to get mock response, its working but the heap memory is not shrinking its continuously increasing
t
Hi Raghu, it sounds like your request journal is growing unbounded. You either need to disable it or limit its size at startup.
r
no-request-journal is false
t
OK, so setting this to true would be one solution
r
how we can set as i'm running jar
directly
t
I’d suggest limiting rather than disabling unless you’re planning to run load tests. You can do this via the CLI with something like:
Copy code
--max-request-journal-entries 1000
All the CLI parameters are documented here: https://wiremock.org/docs/standalone/java-jar/
r
ok let me try
Hi Tom Any property we need to set to perform GC , We See that GC is not performing we are running latest wiremock image in our kubernetes cluster
t
Unless you’re running a very unusual JVM setup there’s nothing you need to do for GC to happen. What’s the visible symptom you’re seeing that makes you think this isn’t happening?
r
heap memory is continiously increasing and its not comming down even though application is sitting idle
t
This is happening when there's no traffic?
r
yes tom
system is idle
t
Do you have health checks hit WireMock regularly?
r
no
t
Could there be anything else hitting it in the background? You could check this via the /__admin/requests endpoint
I ask because it sounds like you still have an unbounded request journal, so any requests being made will gradually fill up the heap
r
I set it request journal value has 100
t
It sounds like that hasn't applied correctly for some reason. But I can really only speculate without more information about how you're deploying and running WireMock