Skip to content

Stale Connections Suddenly Increase when there is a Spike on Application #3359

Open
@akshayk-ktk

Description

@akshayk-ktk

We are noticing Redis commands taking more than 2 seconds when there is a spike on the application.

I am printing the pool stats in the application and I see that many connections became stale as soon as the spike comes.

What can be done to mitigate this?

Expected Behavior

Redis Commands should complete in expected time.

Current Behavior

Redis Commands take more than 2 seconds to complete the commands when there is a Spike.

Redis Client Configuration

poolSize: 5000
connMaxIdleTime: -1s
dialTimeout: 10s
poolTimeout: 10s
readTimeout: 10s
minIdleConns: 3500
maxIdleConns: 3800
connMaxLifetime: -1s

Redis Server

We are using elasticache redis version 7+ in cluster mode. Currently with single shard.

Application is on EC2 running on 4 instances.

Below are the screenshots

Image
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions