You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the watch.Watch().stream() function to listen for Kubernetes events, I encounter the following exception:
aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed: <TransferEncodingError: 400, message='Not enough data for satisfy transfer length header.'>
As a workaround, I've implemented a retry mechanism with backoff.
I didn't specified any timeout_seconds or _request_timeout settings (reference). I want the stream to run infinitely.
Expected Behavior
The event stream should run continuously without encountering ClientPayloadError.
If the connection is interrupted, it should be handled gracefully without requiring retries.
Actual Behavior
The stream occasionally throws ClientPayloadError with a TransferEncodingError (400).
It seems to be caused by incomplete response payloads from the Kubernetes API.
I don't know why you get this errors, so your current workaround with retrying looks good to me.
Could you tell us what kind of cluster do you have? on-prem, google cloud or aws etc?
How frequently do you get this error? Like every 5 minutes? Does it happen if there is no events to watch too? Or maybe it works well if there are lots of events to watch?
Description of the problem
When using the
watch.Watch().stream()
function to listen for Kubernetes events, I encounter the following exception:As a workaround, I've implemented a retry mechanism with backoff.
I didn't specified any
timeout_seconds
or_request_timeout
settings (reference). I want the stream to run infinitely.Expected Behavior
ClientPayloadError
.Actual Behavior
ClientPayloadError
with aTransferEncodingError (400)
.Code
Environment
kubernetes_asyncio
version: 32.0.0timeout_seconds
, even though the goal is an indefinite stream?Would appreciate any insights on whether this is a known issue or if there's a recommended approach to prevent these exceptions.
The text was updated successfully, but these errors were encountered: