Arpit Rege
06/18/2025, 9:07 AMJAVA_MEM_OPTS
or JAVA_OPTS
Context :
Although the overall memory utilisation is not even 60% of the container as i set the mem limit to 400Mib in resources under k8 but it is giving me OOM error when hitting it
HTTP ERROR 500 java.lang.OutOfMemoryError: Java heap space
Lee Turner
06/18/2025, 9:51 AMArpit Rege
06/18/2025, 9:57 AMenv:
- name: WIREMOCK_OPTIONS
value: "--global-response-templating --verbose --async-response-enabled=true --no-request-journal"
Arpit Rege
06/18/2025, 9:59 AMLee Turner
06/18/2025, 10:04 AM--no-request-journal
in there. I would also consider adding --disable-request-logging
and --max-template-cache-entries
The cache helps on the performance side of things so you will need to balance the memory requirements you have over the load test requirements.
I don't think wiremock sets a default. This would be handled by the jvm you are using I would imagine.Arpit Rege
06/18/2025, 10:07 AM--disable-request-logging
and --max-template-cache-entries
as wellArpit Rege
07/04/2025, 3:04 PMJAVA_OPTS
arguments in deployment.yaml file for kubernetes .
Earlier i was giving memLimit 800mb for wiremock but as sson as the memory reached around 50-60% of limit it used to give me heap space error .
With this argument , i increased the heap size to 70-80% of memLimit and was able to reach the memory up to the limit .
- name: JAVA_OPTS
value: "-Xms600m -Xmx600m"