Skip to content

Conversation

@ashb
Copy link
Member

@ashb ashb commented Jul 11, 2025

If you tried to send a large XCom value, it would fail in the task/child
process side with this error:

RuntimeError: unable to read full response in child. (We read 36476, but expected 1310046)

(The exact number that was able to read dependent on any different factors,
like the OS, the current state of the socket and other things. Sometimes it
would read up to 256kb fine, othertimes only 35kb as here)

This is because the kernel level read-side socket buffer is full, so that was
as much as the Supervisor could send. The fix is to read in a loop until we
get it all.

If you tried to send a large XCom value, it would fail in the task/child
process side with this error:

> RuntimeError: unable to read full response in child. (We read 36476, but expected 1310046)

(The exact number that was able to read dependent on any different factors,
like the OS, the current state of the socket and other things. Sometimes it
would read up to 256kb fine, othertimes only 35kb as here)

This is because the kernel level read-side socket buffer is full, so that was
as much as the Supervisor could send. The fix is to read in a loop until we
get it all.
@ashb ashb added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jul 11, 2025
@ashb ashb marked this pull request as ready for review July 11, 2025 14:08
@ashb ashb requested review from amoghrajesh and kaxil as code owners July 11, 2025 14:08
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with @kaxil's optimisation to simplicity too, or even otherwise. LGTM +1

@kaxil kaxil added this to the Airflow 3.0.3 milestone Jul 11, 2025
@kaxil kaxil merged commit b9620bf into apache:main Jul 11, 2025
76 checks passed
@kaxil kaxil deleted the task-sdk-supervisor-read-huge-xcom branch July 11, 2025 15:00
@github-actions
Copy link

Backport failed to create: v3-0-test. View the failure log Run details

Status Branch Result
v3-0-test Commit Link

You can attempt to backport this manually by running:

cherry_picker b9620bf v3-0-test

This should apply the commit to the v3-0-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

github-actions bot pushed a commit that referenced this pull request Jul 11, 2025
…53186)

If you tried to send a large XCom value, it would fail in the task/child
process side with this error:

> RuntimeError: unable to read full response in child. (We read 36476, but expected 1310046)

(The exact number that was able to read dependent on any different factors,
like the OS, the current state of the socket and other things. Sometimes it
would read up to 256kb fine, othertimes only 35kb as here)

This is because the kernel level read-side socket buffer is full, so that was
as much as the Supervisor could send. The fix is to read in a loop until we
get it all.
(cherry picked from commit b9620bf)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
@github-actions
Copy link

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

kaxil pushed a commit that referenced this pull request Jul 11, 2025
…53186) (#53194)

If you tried to send a large XCom value, it would fail in the task/child
process side with this error:

> RuntimeError: unable to read full response in child. (We read 36476, but expected 1310046)

(The exact number that was able to read dependent on any different factors,
like the OS, the current state of the socket and other things. Sometimes it
would read up to 256kb fine, othertimes only 35kb as here)

This is because the kernel level read-side socket buffer is full, so that was
as much as the Supervisor could send. The fix is to read in a loop until we
get it all.
(cherry picked from commit b9620bf)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
kaxil pushed a commit that referenced this pull request Jul 11, 2025
…53186) (#53194)

If you tried to send a large XCom value, it would fail in the task/child
process side with this error:

> RuntimeError: unable to read full response in child. (We read 36476, but expected 1310046)

(The exact number that was able to read dependent on any different factors,
like the OS, the current state of the socket and other things. Sometimes it
would read up to 256kb fine, othertimes only 35kb as here)

This is because the kernel level read-side socket buffer is full, so that was
as much as the Supervisor could send. The fix is to read in a loop until we
get it all.
(cherry picked from commit b9620bf)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
stephen-bracken pushed a commit to stephen-bracken/airflow that referenced this pull request Jul 15, 2025
If you tried to send a large XCom value, it would fail in the task/child
process side with this error:

> RuntimeError: unable to read full response in child. (We read 36476, but expected 1310046)

(The exact number that was able to read dependent on any different factors,
like the OS, the current state of the socket and other things. Sometimes it
would read up to 256kb fine, othertimes only 35kb as here)

This is because the kernel level read-side socket buffer is full, so that was
as much as the Supervisor could send. The fix is to read in a loop until we
get it all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants