https://linen.dev logo
#wiremock-java
Title
# wiremock-java
r

raghu babu parmala

12/19/2023, 5:55 PM
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

Tom

12/19/2023, 6:00 PM
Hi Raghu, it sounds like your request journal is growing unbounded. You either need to disable it or limit its size at startup.
r

raghu babu parmala

12/19/2023, 6:07 PM
no-request-journal is false
t

Tom

12/19/2023, 6:08 PM
OK, so setting this to true would be one solution
r

raghu babu parmala

12/19/2023, 6:08 PM
how we can set as i'm running jar
directly
t

Tom

12/19/2023, 6:09 PM
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

raghu babu parmala

12/19/2023, 6:20 PM
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

Tom

12/21/2023, 6:43 PM
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

raghu babu parmala

12/22/2023, 11:07 AM
heap memory is continiously increasing and its not comming down even though application is sitting idle
t

Tom

12/22/2023, 11:15 AM
This is happening when there's no traffic?
r

raghu babu parmala

12/22/2023, 12:04 PM
yes tom
system is idle
t

Tom

12/22/2023, 12:07 PM
Do you have health checks hit WireMock regularly?
r

raghu babu parmala

12/22/2023, 12:16 PM
no
t

Tom

12/22/2023, 12:19 PM
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

raghu babu parmala

12/22/2023, 12:44 PM
I set it request journal value has 100
t

Tom

12/22/2023, 12:46 PM
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
2 Views