ydb-platform / ydb-platform/ydb-php-sdk
bug: "Sent message larger than max" error is retryable
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 39
- Forks
- 19
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 2
Description
Bug Report
When sending a large payload (e.g. UPSERT with $data parameter exceeding gRPC message limit), the driver returns ResourceExhausted ("trying to send message larger than max"). The problem is that this error is currently treated as retryable. Retrying does not change the situation — the payload size is the same, so every retry fails again with the same error. From the caller's perspective the process effectively hangs (repeated retries until timeout or context cancel), instead of failing fast so the client can reduce batch size or handle the error.
A similar situation was addressed for BulkUpsert and Topic writer. For the Query service (DoTx / Exec with large params), this specific subtype of ResourceExhausted ("message larger than max") should be treated as non-retryable, so that the error is returned to the client immediately. Alternatively, the SDK could handle large messages (e.g. split or document the limit) like for BulkUpsert/Topic.
YDB PHP SDK version:
Any version
Environment
Any environment
Current behavior:
Message retires according to retry configuration
Expected behavior:
- Option A (recommended): Treat ResourceExhausted with description "message larger than max" (and similar parameter size limits) as non-retryable, so the error is returned immediately and the client can reduce batch size or react.
- Option B: Or handle large messages in the SDK (e.g. split before send, or document the limit) like for BulkUpsert/Topic.
Steps to reproduce:
Create an upsert query with huge parameters size
Other information:
Similar issue for go SDK: https://github.com/ydb-platform/ydb-go-sdk/issues/2024
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 by tracing retry handling for the Query service's DoTx and Exec operations, then compare it with the existing BulkUpsert and Topic handling mentioned in the report. Reproduce an upsert with parameters exceeding the gRPC message limit and verify that the matching ResourceExhausted error is returned without retries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100