Loading

MuleSoft Application Memory Increases to a High Level Even When Idle

Data da publicação: Mar 12, 2026
Descrição

Even when a MuleSoft application is idle, the memory being used seems to steadily increase to a high level. Then the memory is released and the pattern starts again. This causes a saw-tooth pattern on the Memory graphs.

Resolução

The MuleSoft application runs some background processes that can consume heap memory, even when the application is idle. These processes include system health checks and other monitoring-related tasks.

As a result, it is normal to observe a sawtooth pattern in heap usage, where memory usage gradually increases and is then reduced during garbage collection cycles. This behavior is expected in Java applications, even when there is little or no application traffic.

Because it is not efficient to constantly clear memory in a mostly idle application, the heap may gradually grow over time until a significant portion of memory is used. This growth is typically due to memory accumulated by background processes, which is expected behavior.

Eventually, the Garbage Collector will run and reclaim the unused memory, reducing the heap usage again.

If the application is using a lot of memory much more quickly, the Garbage Collection becomes more aggressive. That is, the memory will clear more regularly. The Garbage Collection doesn't automatically kick in when it reaches a specific memory level, but rather calculates how quickly the memory is being used and judges it based on that.

If a large payload or sudden intensive Flow kicks in while the memory is already at a high level, the Garbage Collector will simply kick in before the JVM runs out of memory. The strain on the CPU will be negligible also, so you will see no performance loss. The only real worry would be if the payload being processed is too high, even for normal memory levels.
 

SOLUTION

If the sawtooth pattern shows the memory low point as being around the same level after each Garbage Collection, then there should be no further action to take. If you see that the Garbage Collection task does not clear all the memory back to expected levels, then you should start looking at the individual application components for a potential memory leak.

Please also see the article Java JVM memory allocation pattern explained for more information.


 

Número do artigo do Knowledge

001119048

 
Carregando
Salesforce Help | Article