Reputation: 1440
I'm monitoring my Spring WebFlux app with VisualVM and I'm noticing a strange thing.
The boundedElastic
threads are keeps increasing.
The thing is that I don't use boundedElastic
scheduler in my app app manually.
After debugging I found this
Seems that InMemoryWebSessionStore
requests the Schedulers.boundedElastic
. The thing is that this method does not require any authorization though I have Spring Security in the dependencies.
How can I disable this behavior? I don't want my app to grow some thread pool size infinitely. Especially when those threads aren't even used.
P.S. Maybe this issue comes from the fact that I inject ServerWebExchange
as the controller method parameter. But I need it to retrieve the request's cookies and headers
Upvotes: 1
Views: 1607
Reputation: 1440
Ok, I got it. WebSessionManager
is auto-configured. I have to declare my own no-op implementation. Here is the similar question.
Upvotes: 1