You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and InspectorClient.connect() reads it as "no bound at all":
constconnectTimeoutMs=this.serverSettings?.connectionTimeout??0;// … the Promise.race and the transport teardown are both gated on `> 0`
So out of the box, nothing the Inspector owns bounds a connect attempt.
Why this is subtler than it looks
The reason this hasn't produced a flood of reports is that the SDK's own per-request timeout covers the initialize the handshake is waiting on. Measured against a server that accepts the TCP connection and never answers initialize:
Exactly 60 seconds, every run. Which is the good news and the problem in one sentence: we are bounded by something we don't own, didn't ask for, and don't control the message of.
Three consequences worth weighing:
The coverage is incidental, not designed. It bounds what happens to sit inside an SDK request. Connect-time work outside one — transport.start(), and the OAuth work in OAuth path has no request timeouts outside token revocation #2319 when it isn't nested inside a request — has nothing bounding it.
The error belongs to the wrong layer. A user who waits out a failed connect is told Request timed out, which describes a JSON-RPC request, not a connection attempt. Connection timed out after N ms is the sentence that connect path already knows how to produce — it just never runs at the default.
60s is a long time to look at a spinner with no indication that anything is wrong, and it is not a number anyone here chose.
The actual question
This is a product decision more than a bug, which is why it is filed as its own issue rather than folded into #2319: should connectionTimeout default to a real value?
Arguments for keeping 0: a slow server on a slow link is legitimate, and a default that fires early turns a working setup into a support question. Arguments for a real default: every other timeout in the product has one, "no bound" is not a sensible default for a network operation, and the current behavior only looks acceptable because a lower layer happens to cover the common case.
A reasonable middle: keep the effective bound generous, but make it ours and make it say so — so the failure reads as a connection timeout with the server's name in it, and the setting means what it says rather than being dead at its own default.
Honest scope
I found this while chasing #2188 and initially believed it was the cause. It is not — the measurement above is what ruled it out. Filing it because "the default disables the feature, and the only thing saving us is another layer's timeout" is worth a deliberate decision either way, not because anything is currently observed to be broken.
Decision
Let's add the timeout and make it 30 seconds. Update the message shown on timeout to include "To accommodate a slower server, you may increase the timeout value in Server Settings."
Follow-up from the investigation on #2188.
What
connectionTimeoutdefaults to0:and
InspectorClient.connect()reads it as "no bound at all":So out of the box, nothing the Inspector owns bounds a connect attempt.
Why this is subtler than it looks
The reason this hasn't produced a flood of reports is that the SDK's own per-request timeout covers the
initializethe handshake is waiting on. Measured against a server that accepts the TCP connection and never answersinitialize:Exactly 60 seconds, every run. Which is the good news and the problem in one sentence: we are bounded by something we don't own, didn't ask for, and don't control the message of.
Three consequences worth weighing:
transport.start(), and the OAuth work in OAuth path has no request timeouts outside token revocation #2319 when it isn't nested inside a request — has nothing bounding it.Request timed out, which describes a JSON-RPC request, not a connection attempt.Connection timed out after N msis the sentence that connect path already knows how to produce — it just never runs at the default.The actual question
This is a product decision more than a bug, which is why it is filed as its own issue rather than folded into #2319: should
connectionTimeoutdefault to a real value?Arguments for keeping
0: a slow server on a slow link is legitimate, and a default that fires early turns a working setup into a support question. Arguments for a real default: every other timeout in the product has one, "no bound" is not a sensible default for a network operation, and the current behavior only looks acceptable because a lower layer happens to cover the common case.A reasonable middle: keep the effective bound generous, but make it ours and make it say so — so the failure reads as a connection timeout with the server's name in it, and the setting means what it says rather than being dead at its own default.
Honest scope
I found this while chasing #2188 and initially believed it was the cause. It is not — the measurement above is what ruled it out. Filing it because "the default disables the feature, and the only thing saving us is another layer's timeout" is worth a deliberate decision either way, not because anything is currently observed to be broken.
Decision
Let's add the timeout and make it 30 seconds. Update the message shown on timeout to include "To accommodate a slower server, you may increase the timeout value in Server Settings."
Related