diff --git a/python/lsst/daf/butler/remote_butler/_factory.py b/python/lsst/daf/butler/remote_butler/_factory.py index b872d2fa86..de18a5b4e5 100644 --- a/python/lsst/daf/butler/remote_butler/_factory.py +++ b/python/lsst/daf/butler/remote_butler/_factory.py @@ -66,7 +66,18 @@ def __init__(self, server_url: str, http_client: httpx.Client | None = None): if http_client is not None: self.http_client = http_client else: - self.http_client = httpx.Client() + self.http_client = httpx.Client( + # This timeout is fairly conservative. This value isn't the + # maximum amount of time the request can take -- it's the + # maximum amount of time to wait after receiving the last chunk + # of data from the server. + # + # Long-running, streamed queries send a keep-alive every 15 + # seconds. However, unstreamed operations like + # queryCollections can potentially take a while if the database + # is under duress. + timeout=120 # seconds + ) self._cache = RemoteButlerCache() @staticmethod