ydb-platform / ydb-platform/ydb-php-sdk
bug: SDK must retry retriable grpc errors
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 39
- Forks
- 19
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 2
Description
Bug Report
YDB PHP SDK version:
latest
Environment
ubuntu18
Current behavior:
PHP Fatal error: Uncaught YdbPlatform\Ydb\Exception: YDB Table DeleteSession (status code 14): failed to connect to all addresses; last error:
UNKNOWN: ipv4:xx.xxx.xxx.xx:2135: tcp handshaker shutdown in /path/vendor/ydb-platform/ydb-php-sdk/src/Traits/RequestTrait.php:163#012
Stack trace:
#012#0 /path/vendor/ydb-platform/ydb-php-sdk/src/Traits/RequestTrait.php(87): YdbPlatform\Ydb\Session->checkStatus('Table', 'DeleteSession', Object(stdClass))
#012#1 /path/vendor/ydb-platform/ydb-php-sdk/src/Session.php(604): YdbPlatform\Ydb\Session->doRequest('Table', 'DeleteSession', Array)
#012#2 /path/vendor/ydb-platform/ydb-php-sdk/src/Session.php(152): YdbPlatform\Ydb\Session->request('DeleteSession', Array)
#012#3 /path/vendor/ydb-platform/ydb-php-sdk/src/Sessions/MemorySessionPool.php(23): YdbPlatform\Ydb\Session->delete()
#012#4 [internal function]: YdbPlatform\Ydb\Sessions\MemorySessionPool->__destruct()
#012#5 {main}#012 thrown in /path/vendor/ydb-platform/ydb-php-sdk/src/Traits/RequestTrait.php on line 163
Expected behavior:
php working more than 12 hours
and somehow we lost internet connection
Steps to reproduce:
php in background with simple select from ydb and disconnect of internet on it
Related code:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/Traits/RequestTrait.php, especially the checkStatus and doRequest paths shown in the stack trace, and inspect how DeleteSession errors are handled. Reproduce the issue by running a simple background select and disconnecting the network. Done means retriable gRPC failures are retried so the long-running PHP process can continue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100