Error: elasticache network connections tracked allowance exceeded

What's Causing This Error

This error occurs when the number of network connections, tracked by Amazon ElastiCache on a particular cache node, exceeds the set limit. Each cache node type has a predefined limit on the maximum number of connections it can handle simultaneously. The issue could be due to a sudden spike in connections or a misconfiguration in your application that is causing it to create many connections to the ElastiCache node.

Solution - Here's How To Resolve It

To resolve this issue, you have several possible solutions:

  1. Optimize application connection management: Ensure that your application is using connection pooling to help reduce the number of concurrent connections to the cache node. Verify your application configuration and adjust the connection pool settings according to your usage patterns.
  2. Monitor and analyze connection usage: Use Amazon CloudWatch metrics to monitor the number of connections to your cache node and identify any unusual spikes or trends in connections. Analyze these metrics to determine if specific events or operations are causing excessive connection usage and optimize accordingly.
  3. Scale up or scale out: If your application requires more connections than the cache node currently supports, consider upgrading to a larger cache node type with support for more connections, or distribute your workload across multiple cache nodes by horizontally scaling your cluster.
  4. Implement connection request throttling: Implement a throttling mechanism in your application, such as a rate limiter or backoff algorithm, to prevent too many connection requests from overwhelming the cache node at once.

Was this content helpful?

Start building today

Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.