How to fix OutOfMemory happened with Lettuce Redis

267 views Asked by At

We are using spring data Redis Reactive(with lettuce). Application instance freezed with OutOfMemory Error. Analysis of the heap dump shows that 128 instances of DefaultEventExecutor occupied the maximum of the heap space (DefaultEventExecutor.taskQueue holds the io.lettuce.core.RedisPublisher$OnComplete instances). How can I fix this?

Below is the thread pool configuration

clientConfigurationBuilder
.clientResources(ClientResources.builder().ioThreadPoolSize(128).computationThreadPoolSize(128).build())
.clientOptions(ClientOptions.builder().publishOnScheduler(true).build());

Note: Spring web flux is also being used in the same project.

0

There are 0 answers