3

调用函数时出现以下错误mongoTemplate.collectionExists

com.mongodb.MongoCommandException: Command failed with error 2: 'Cannot open a new cursor since too many cursors are already opened' on server documentdb-cluster-dev-2.cipll54l4b4g.eu-central-1.docdb.amazonaws.com:27017. The full response is
{
    "ok": 0,
    "errmsg": "Cannot open a new cursor since too many cursors are already opened",
    "code": 2
}

at org.springframework.data.mongodb.core.MongoExceptionTranslator.translateExceptionIfPossible(MongoExceptionTranslator.java:131)
at org.springframework.data.mongodb.core.MongoTemplate.potentiallyConvertRuntimeException(MongoTemplate.java:2589)
at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:499)
at org.springframework.data.mongodb.core.MongoTemplate.collectionExists(MongoTemplate.java:600)
at sun.reflect.GeneratedMethodAccessor217.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:223)
at org.springframework.cloud.context.scope.GenericScope$LockedScopedProxyFactoryBean.invoke(GenericScope.java:494)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
at org.springframework.data.mongodb.core.MongoTemplate$$EnhancerBySpringCGLIB$$ba89d337.collectionExists(<generated>)

我正在使用 Spring 框架的 MongoTemplate 和 AWS 的 DocumentDB 作为 mongodb (spring-boot-starter-data-mongodb:2.0.10.RELEASE)

有没有办法增加游标的限制?我看到了 ORACLE,有一种方法可以增加打开游标的限制,但没有找到 mongo/documentDb 的任何内容。

4

0 回答 0