Mockserver caps Max Log Entries way lower than it can handle
Starting up Mockserver, without overriding MOCKSERVER_MAX_LOG_ENTRIES defaults to 18k entries.
Increasing MOCKSERVER_MAX_LOG_ENTRIES to 100k and running our program against it, it supports well over 64k log entries, why is the default so low?
Last tested on snapshot of 5.12.2
Originally posted by @busches in https://github.com/mock-server/mockserver/issues/1171#issuecomment-1079736293
This has been fixed in 5.13.1, but the latest version is 5.13.2
Tried 5.13.2, as soon as I remove MOCKSERVER_MAX_LOG_ENTRIES: 500000 from my docker-compose.yaml my build starts failing again.
Same test suite as in #1171, but tested against 5.13.2.
Not setting MOCKSERVER_MAX_LOG_ENTRIES I get 18617 log entries, despite my heap being super free.
memoryUsage_2022-04-21_default.csv
Once I set MOCKSERVER_MAX_LOG_ENTRIES to 500000, as it's a high number I know CI and my computer can support, we see the eventLogSize gets up to 76918 which is over 4x the default and my heap shows plenty of room to grow.
memoryUsage_2022-04-21_500k_max_log_entries.csv
Can you reopen this? Thanks!
This is strange because your results seem very inconsistent to multiple other tests that have been run.
To try to work out why I can't reproduce your results can you please tell me:
- JVM version
- container base image
- OS running the container
- JVM memory allocation
- OS memory allocation
I suspect the different may be due to the invalid way JVMs handle memory inside a container, ignoring the container limits and only looking at the OS values. This was fixed in Java but I can't remember in which version.
We're running the mockserver docker image:
FROM mockserver/mockserver:5.13.2
COPY mockserver.properties /config/mockserver.properties
COPY initializerJson.json /config/initializerJson.json
OS is either MacOS or ubuntu:bionic in CI. The JVM is controlled by you and the docker image and we can see from the memory snapshots there is plenty of free memory. I also added docker stats snapshots to the previous ticket.