spring-framework: MongoWaitQueueFullException in Webflux + Reactive Mongo

Affects: 5.1.2.RELEASE


The latest TechEmpower’s benchmark shows a lot of errors for Webflux + Spring data mongo. I digged and found out that under load, we get a lot of com.mongodb.MongoWaitQueueFullException: Too many threads are already waiting for a connection. Max number of threads (maxWaitQueueSize) of 500 has been exceeded. exceptions.

From our discussion on gitter, @mp911de thinks that “WebFlux could have a notion of connection backpressure and should limit subscription rate/demand rate to provide a sense of protection for downstream components within the application”.

Code of the benchmark here

Related issue : #20338

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Yes, and I believe that would also be resolved by a reactive DB Connection pooled capped at 500 connections.