Browsed by
Tag: spring

Netty Cache Thread Memory Issues

Netty Cache Thread Memory Issues

When running spring-boot using netty (we ran: 4.1.69), and async code, your server might run into a memory issue after running for a while. In our case we were using spring-cloud-gateway (we ran: 3.0.5), and after two weeks of running, we started hitting long garbage collection times. To get around this, we did multiple code fixes, amongst one was disabling the thread-local caches for non-netty threads. To do this, add JVM option: For an explanation, see: https://github.com/spring-projects/spring-framework/issues/21174 Quote: The PooledByteBufAllocator…

Read More Read More