我有一个ReactiveMongoRepository,其方法返回Flux 每当调用该方法时,它都会打开一个新连接
Opened connection [connectionId{localValue:118, serverValue:44}]
直到它超过抛出100为止
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=54.37.81.35:58789, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /54.37.81.35:58789}, caused by {java.net.ConnectException: Connection refused}}]
at com.mongodb.connection.BaseCluster.getDescription(BaseCluster.java:167) ~[mongodb-driver-core-3.6.3.jar:na]
因为没有池可用了。知道如何解决或有任何建议吗?
谢谢