Hello,
I am building a web app with webflux springboot 3.3.0 and spring-data-mongodb 4.3.1 using mongodb-driver-reactivestreams 5.1.1 and Java 17
Mongodb uses springboot autoconfiguration, no special configuration applied.
When I do a simple repository query:
public Mono<Application> findByIdWithDsl(String applicationId) {
return reactiveMongoTemplate.findById(applicationId, Application.class)
.log();
}
Sometimes (not always) it hangs while getting a connection - it blocks forever. Is there something I could do to get some more insight on what’s going on? It does happen also when there is no load / no other requests.
Or anybody have some hints why it might behave like this?
2024-06-17 21:40:33.941 DEBUG o.s.data.mongodb.core.ReactiveMongoTemplate#doFindOne:2330 [nioEventLoopGroup-4-3]: findOne using query: { "id" : "6643812722e3a5542b9e9735"} fields: Document{{}} for class: class org.lowcoder.domain.application.model.Application in collection: application
2024-06-17 21:40:33.942 INFO reactor.util.Loggers$Slf4JLogger#info:279 [nioEventLoopGroup-4-3]: | onSubscribe([Fuseable] FluxOnAssembly.OnAssemblySubscriber)
2024-06-17 21:40:33.943 INFO reactor.util.Loggers$Slf4JLogger#info:279 [nioEventLoopGroup-4-3]: | request(unbounded)
2024-06-17 21:40:33.944 DEBUG c.mongodb.internal.diagnostics.logging.SLF4JLogger#debug:56 [nioEventLoopGroup-4-3]: Server selection started for operation with ID 44. Selector: ReadPreferenceServerSelector{readPreference=primary}, topology description: {type=STANDALONE, servers=[{address=127.0.0.1:37017, type=STANDALONE, roundTripTime=20.9 ms, state=CONNECTED}]
2024-06-17 21:40:33.945 DEBUG c.mongodb.internal.diagnostics.logging.SLF4JLogger#debug:56 [nioEventLoopGroup-4-3]: Server selection succeeded for operation with ID 44. Selected server: 127.0.0.1:37017. Selector: ReadPreferenceServerSelector{readPreference=primary}, topology description: {type=STANDALONE, servers=[{address=127.0.0.1:37017, type=STANDALONE, roundTripTime=20.9 ms, state=CONNECTED}]
2024-06-17 21:40:33.946 DEBUG c.mongodb.internal.diagnostics.logging.SLF4JLogger#debug:56 [nioEventLoopGroup-4-3]: Checkout started for connection to 127.0.0.1:37017