Node: Timeout failures on version 2.1.1+
Describe the bug
Timeout failures are happening when running connecting to elasticache via node valkey client on version 2.1.1+
Expected Behavior
Operations do not take significantly longer than 3.1.0 and earlier and time out
Current Behavior
Connection error: Cluster(Failed to create initial connections - IoError: Failed to refresh both connections - IoError: Node: "exampleurl:6379" received errors: `timed out`, `timed out`)
All source code versions work perfectly when built locally: • v2.0.1 ✓ • v2.1.0 ✓ • v2.1.1-rc1 ✓ • v2.1.1 ✓ • release-2.1 branch ✓ • main branch (latest) ✓
Published npm packages fail starting from v2.1.1-rc1: • v2.1.0 (npm) ✓ • v2.1.1-rc1 (npm) ✗ • v2.1.1 (npm) ✗ • v2.1.2 (npm) ✗
Reproduction Steps
Open 10 node connections
const client = await GlideClusterClient.createClient({
addresses: [{ host: process.env.ELASTICACHE_ENDPOINT, port: 6379 }],
requestTimeout: 5000,
useTLS: true,
});
Possible Solution
No response
Additional Information/Context
No response
Client version used
2.1.1
Engine type and version
OS
Language
TypeScript
Language Version
Cluster information
No response
Logs
No response
Other information
No response
We are seeing the same behavior, however, we are having difficulting consistently reproducing it. Still investigating.
Using
- ElastiCache v7.2.6
- Amazon Linux 2023
- Node v22.20.0
@valkey/[email protected]from npm
ElastiCache engine logs contain Error accepting a client connection: connection is closed. and Error accepting a client connection: Broken pipe. messages.
We're experiencing the same issue during connecting an AWS ElastiCache Serverless instance. We went back to 2.1.0 and connection works just as expected.
This issue should be resolved with the merging of PR connection timeout value fix for clients #4966 along with some additional logging to display the parameters and how long connection actually took.
These changes are now available with the release of Valkey GLIDE 2.2.0-rc1 today. You can find the Node version here
Version 2.2.0-rc1 has fixed the timeout issues for me.
@fenichelar @forbidwolf Have either of you been able to upgrade to version 2.2.0 for your node versions and are still having connectivity issues?
Otherwise I will closing out this ticket soon and will create new ones for future follow ups.
I can confirm that 2.2.0-rc2 fixed the issue for golang
@xShinnRyuu, shall we close this issue?
Closing this ticket as it was resolved with the release of Valkey-GLIDE 2.2.x
We are still seeing frequent timeout issues with 2.2.0.
ElastiCache cluster v7.2.6 Amazon Linux 2023 Node v22.20.0 Valkey Glide v2.2.0
TLS, AZAffinityReplicasAndPrimary
@fenichelar
Are the errors the same as the ones from your previous comment above?
ElastiCache engine logs contain Error accepting a client connection: connection is closed. and Error accepting a client connection: Broken pipe. messages.
If so this doesn't seem like an issue with the Valkey GLIDE client. It looks more like an issue with the server not accepting the connection.
Could you elaborate on your code and how you are using the client? Better yet it would be best if you could create a new issue explaining your issue in more details, so that we can provide better support.