-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Description
Expected Behavior
This message in log should contain real number of dial attempts
internal.Logger.Printf(ctx, "redis: connection pool: failed to dial after %d attempts: %v", maxRetries, lastErr)
Current Behavior
Error message uses maxRetries instead of real number of attempts made
If dial attempts take too long and DialerRetryTimeout is reached before attempts number reaches DialerRetries error message is wrong.
Possible Solution
- move loop variable
attemptoutside os loop and use in in error log
Steps to Reproduce
will provide on a weekend if it is needed
Context (Environment)
This is log from my service is development environment. Dial timeout was too high so only one dial attemt was made.
Before I enabled debug log I was a little worried that service really spent 5 seconds in dialConn
2025-11-10T17:09:06.728221+00:00 qa myservice[48031]: 17:09:06.728154 debug: redis: dial <ip1>:6379(tcp) in 1.001085613s with dial tcp <ip1>:6379: i/o timeout
2025-11-10T17:09:06.728247+00:00 qa myservice[48031]: 17:09:06.728189 redis: connection pool: failed to dial after 5 attempts: dial tcp <ip1>:6379: i/o timeout
Metadata
Metadata
Assignees
Labels
No labels