diff --git a/client/starwhale/core/model/copy.py b/client/starwhale/core/model/copy.py index 3ab15403e1..5a69a18adf 100644 --- a/client/starwhale/core/model/copy.py +++ b/client/starwhale/core/model/copy.py @@ -61,12 +61,17 @@ def _prepare_common_contextvars() -> None: _blob_sem.set( trio.Semaphore(int(os.environ.get("SW_BUNDLE_COPY_BUFFER_BLOBS", "32"))) ) - timeout = httpx.Timeout(10.0, connect=30.0) + timeout = httpx.Timeout( + float(os.environ.get("SW_BUNDLE_COPY_DATA_NET_TIMEOUT", "90")) + ) limits = httpx.Limits( max_keepalive_connections=_net_sem.get().value, max_connections=_net_sem.get().value, ) - transport = httpx.AsyncHTTPTransport(retries=3, limits=limits) + transport = httpx.AsyncHTTPTransport( + retries=int(os.environ.get("SW_BUNDLE_COPY_DATA_NET_RETRY", "10")), + limits=limits, + ) _httpx_client.set( httpx.AsyncClient(timeout=timeout, limits=limits, transport=transport) )