Skip to content

Fetching large ACS's fail unless a large timeout is specified #521

@da-tanabe

Description

@da-tanabe

We've observed that when fetching unusually large ACS'es, dazl will terminate the connection with a failure if it takes more time than the default timeout (30 seconds) to pull down.

There's a chance that this code isn't doing what I think it should be doing:

# Unidirectional gRPC streams cannot sensibly have a deadline because the stream may be
# open indefinitely. However, if fetching an individual message from the stream takes a
# long time here, we can reasonably assume that the stream is dead, because Active
# Contract Set messages are really supposed to be sent as quickly as the server can send
# them. In other words, a long timeout pause in the middle of pulling down ACS messages
# would be highly unusual, so we treat them as fatal
i = response_stream.__aiter__()
while True:
try:
response = await wait_for(i.__anext__(), timeout=self._call.timeout_seconds)

Determine why larger timeouts seem to allow this code to run successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions