mockserver icon indicating copy to clipboard operation
mockserver copied to clipboard

Mockserver caps Max Log Entries way lower than it can handle

Open busches opened this issue 3 years ago • 5 comments

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

busches avatar Apr 13 '22 18:04 busches

This has been fixed in 5.13.1, but the latest version is 5.13.2

jamesdbloom avatar Apr 21 '22 20:04 jamesdbloom

Tried 5.13.2, as soon as I remove MOCKSERVER_MAX_LOG_ENTRIES: 500000 from my docker-compose.yaml my build starts failing again.

busches avatar Apr 21 '22 21:04 busches

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!

busches avatar Apr 21 '22 21:04 busches

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.

jamesdbloom avatar Apr 22 '22 08:04 jamesdbloom

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.

busches avatar Apr 22 '22 13:04 busches