0

We have been trying to use the Mirth Connect docker container for some integration projects for a few months now. We see that the memory use goes up over time and always eventually crashes.

When you stop sending messages to the channel, the memory use doesn't go down. As if garbage collection doesn't run? Then when you start sending messages again, it picks up increasing the memory footprint right from where it left off.

Everyone talks about increasing the JVM heap, which we've done multiple times and set to even absurd values. But if JVM doesn't recover old memory, the heap memory limit is irrelevant, you're just buying time before it crashes.

What JVM properties or Mirth configurations have you done to recover unused memory to keep the container stable?

https://hub.docker.com/r/nextgenhealthcare/connect

Mark
  • 538
  • 6
  • 17
  • 3
    the garbage collectors _does_ run, otherwise you get OutOfMemory; but it does not _un-commit_ memory back to the OS (whatever your docker is using). But most probably your problem stems from an entirely different issue. A JVM process is _more_ that just Heap... I assume `eventually crashes` means that it dies with `cgroup limit`? If so, start by reading [this](https://stackoverflow.com/questions/61506136/kubernetes-pod-memory-java-gc-logs/61512521#61512521) for example. – Eugene Jul 10 '20 at 15:52
  • or [this](https://stackoverflow.com/questions/53451103/java-using-much-more-memory-than-heap-size-or-size-correctly-docker-memory-limi) – Eugene Jul 10 '20 at 15:52

1 Answers1

0

You are not cleaning up some resource that is being opened/created when a message goes into the channel. In testing I have sent over 100 Million messages into a channel without any sort of memory issue. I'd check for DB connections being created and not closed. The second thing I'd look at is some values being sorted in maps.

Michael Hobbs
  • 1,663
  • 1
  • 15
  • 26