valkey-glide icon indicating copy to clipboard operation
valkey-glide copied to clipboard

Node: Timeout failures on version 2.1.1+

Open alexr-bq opened this issue 1 month ago • 7 comments

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

alexr-bq avatar Nov 10 '25 23:11 alexr-bq

We are seeing the same behavior, however, we are having difficulting consistently reproducing it. Still investigating.

Using

ElastiCache engine logs contain Error accepting a client connection: connection is closed. and Error accepting a client connection: Broken pipe. messages.

fenichelar avatar Nov 11 '25 00:11 fenichelar

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.

forbidwolf avatar Nov 12 '25 10:11 forbidwolf

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

xShinnRyuu avatar Nov 13 '25 07:11 xShinnRyuu

Version 2.2.0-rc1 has fixed the timeout issues for me.

alexgsummer avatar Nov 18 '25 00:11 alexgsummer

@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.

xShinnRyuu avatar Nov 18 '25 20:11 xShinnRyuu

I can confirm that 2.2.0-rc2 fixed the issue for golang

aijanai avatar Nov 21 '25 12:11 aijanai

@xShinnRyuu, shall we close this issue?

yipin-chen avatar Nov 26 '25 07:11 yipin-chen

Closing this ticket as it was resolved with the release of Valkey-GLIDE 2.2.x

xShinnRyuu avatar Dec 03 '25 18:12 xShinnRyuu

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 avatar Dec 04 '25 16:12 fenichelar

@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.

xShinnRyuu avatar Dec 04 '25 23:12 xShinnRyuu