-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I'm running a cloud function every minute. Periodically I'm getting the following error while trying to get a db session. I'm closing a session at the end of the handler by calling close().await(), but still it does not help.
Caused by: com.yandex.ydb.core.UnexpectedResultException: cannot create session, code: OVERLOADED, issues: [Active sessions limit exceeded, maximum allowed: 1000 (S_ERROR)]
at com.yandex.ydb.core.Result$Fail.newException(Result.java:217)
at com.yandex.ydb.core.Result$Fail.expect(Result.java:169)
at com.yandex.ydb.table.impl.SessionPool.lambda$create$0(SessionPool.java:57)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:642)
... 22 more
This is how I create the client:
TableClient
.newClient(GrpcTableRpc.useTransport(transport))
.build()
And I switched to this recently (but the error is still there):
TableClient
.newClient(GrpcTableRpc.useTransport(transport))
.sessionPoolSize(0, 10)
.sessionMaxIdleTime(Duration.of(120, ChronoUnit.SECONDS))
.build()
What could be wrong?
The version is 1.10.3.
Metadata
Metadata
Assignees
Labels
No labels