Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-connect-fail-fast=false doesn't work #333

Open
micheljung opened this issue Aug 18, 2024 · 5 comments
Open

-connect-fail-fast=false doesn't work #333

micheljung opened this issue Aug 18, 2024 · 5 comments

Comments

@micheljung
Copy link

micheljung commented Aug 18, 2024

Neither on Windows 11 nor with the Docker image.

grpcui --version
grpcui v1.4.1
grpcui --open-browser=false -plaintext -connect-fail-fast=false -connect-timeout=1 127.0.0.1:9000
Failed to dial target host "127.0.0.1:9000": dial tcp 127.0.0.1:9000: connectex: No connection could be made because the target machine actively refused it.

<program exits>

As soon as the gRPC server is running:

grpcui --open-browser=false -plaintext -connect-fail-fast=false -connect-timeout=1 127.0.0.1:9000
gRPC Web UI available at http://127.0.0.1:13540/
@micheljung micheljung changed the title -connect-fail-fast=false doesn't seem to work -connect-fail-fast=false doesn't work on Windows Aug 18, 2024
@micheljung micheljung changed the title -connect-fail-fast=false doesn't work on Windows -connect-fail-fast=false doesn't work Aug 18, 2024
@nemith
Copy link

nemith commented Jan 10, 2025

I am having the same issue here.

@jhump
Copy link
Contributor

jhump commented Jan 10, 2025

When that flag is true (the default), connection errors will cause the UI to bail immediately and report the error. When it is false, connections will be retried (with exponential backoff) up until the timeout is reached.

So I think the issue is the -connect-timeout=1 flag, which means even when it retries instead of failing fast, it still fails because it will only wait one second for the connection to be established.

You should set the timeout to the maximum amount of time to wait for a connection. When used with multiple docker images, this should be the maximum time for the server container to actually start and begin serving, which is probably on the order of single digit minutes, not single digit seconds.

@nemith
Copy link

nemith commented Jan 16, 2025

It would be nice to not have a timeout at all if you are really deploying as a side car. I tried a negative number but it wasn't supported.

Would infinity timeout be out of the question?

@jhump
Copy link
Contributor

jhump commented Jan 16, 2025

You can set it to an absurdly large number, like 2000000000 (which is ~63 years), and it will be effectively infinite.

Looks like there is currently an overflow risk if you set the value too high though. (Should be fixed in #360.)

@nemith
Copy link

nemith commented Jan 16, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants