Memory Leak issue while upgrading TYK from version 4.3.4 to 5.8.5

Hi Team

We recently have upgraded TYK from v4.3.4 to v5.8.5. Initially the memory was at 20% on 3 nodes of TYK each having 4 core CPU and 8GB memory.

But gradually memory kept increasing and in ~2 months the memory on all nodes reached till 80%, we did not have pprof enabled earlier so don’t have any profiling data for memory usage.

Can anybody guide on direction to check what could have caused this leak issue.

Hi Mohit

Are you using JWT with JWKS URL caching on your APIs?

I ask, as the cache mechanism in 5.8.5 doesn’t release memory correctly, leading to a gradual increase in consumption over time. That would match the symptoms you are seeing?

I can see that this issue was resolved in version 5.8.6 and later, so an upgrade would resolve this

James