0

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.

user1433374
  • 185
  • 1
  • 9
  • Why do you have 128 io/compute threads? Lettuce is non-blocking, you shouldn't need that many threads unless you're running on a 128 core processor. Is it possible you're creating multiple client resources? Can you show more code of how this is used? – Michael Apr 17 '23 at 04:40

0 Answers0