π Bug Report β Runtime APIs: successive fetch()
es fail if upstream doesn't consume body
#1741
Labels
bug
Something isn't working
Hey! π When investigating cloudflare/workers-sdk#5095, we observed
Network connection lost
errors from successive calls tofetch()
if the upstream didn't consume the request body. Specifically, every other request would fail. See https://github.com/mrbbot/workerd-network-connection-lost-repro for a minimal reproduction. Uncommenting this line https://github.com/mrbbot/workerd-network-connection-lost-repro/blob/04b2a464c8c269fb467ca5247efbb6da2303c9f5/user.capnp#L19 "fixes" the issue. It also seems like this line https://github.com/mrbbot/workerd-network-connection-lost-repro/blob/04b2a464c8c269fb467ca5247efbb6da2303c9f5/index.mjs#L32 needs to create a body with at least2**16 + 1
bytes to trigger a reproduction.This issue feels related to #1376 and #960. In #960 (comment), it was suggested that
workerd
should be canceling the upload in cases where a response is returned without reading the body. It feels like the same thing should be happening here./cc @petebacondarwin @RamIdeas
The text was updated successfully, but these errors were encountered: