diff --git a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/api_client/_base.py b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/api_client/_base.py index c13ef6b7713..47701abd1d2 100644 --- a/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/api_client/_base.py +++ b/services/director-v2/src/simcore_service_director_v2/modules/dynamic_sidecar/api_client/_base.py @@ -127,7 +127,15 @@ def __init__( ) -> None: self.request_timeout: int = request_timeout - client_args: dict[str, Any] = {} + client_args: dict[str, Any] = { + # NOTE: the default httpx pool limit configurations look good + # https://www.python-httpx.org/advanced/#pool-limit-configuration + # instruct the remote uvicorn web server to close the connections + # https://www.uvicorn.org/server-behavior/#http-headers + "headers": { + "Connection": "Close", + } + } if base_url: client_args["base_url"] = base_url if timeout: