Skip to content

Commit

Permalink
Increase GatewayClient timeout to 120s
Browse files Browse the repository at this point in the history
  • Loading branch information
r4victor committed Apr 30, 2024
1 parent 2761a90 commit c3687db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dstack/_internal/server/services/gateways/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ def __init__(self, uds: Optional[str] = None, port: Optional[int] = None):
self.is_server_ready = False

self.base_url = "http://gateway" if uds else f"http://localhost:{port}"
# We set large timeout because service registration can take time.
# Consider making gateway API async to avoid long-running requests.
self._client = AsyncClientWrapper(
transport=httpx.AsyncHTTPTransport(uds=uds) if uds else None, timeout=30
transport=httpx.AsyncHTTPTransport(uds=uds) if uds else None, timeout=120
)

async def register_service(
Expand Down

0 comments on commit c3687db

Please sign in to comment.