Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create session, code: OVERLOADED #17

Open
alex-dorokhov opened this issue Feb 11, 2022 · 0 comments
Open

Cannot create session, code: OVERLOADED #17

alex-dorokhov opened this issue Feb 11, 2022 · 0 comments

Comments

@alex-dorokhov
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant