Intermittent Redis connection failures

Hi folks

I’ve been running Nextcloud in AWS (ECS + Fargate) using the Apache Dockerfile for a couple of years. I use it for my family and it’s fairly low traffic.

I’m scrimping on costs by using a Redislabs hosted Redis instance. I sometimes see errors in the logs about losing connections, server going away etc that are intermittent. I’ve tried upping the timeouts but it always feels flaky.

I see errors like:

[PHP] Error: session_start(): Failed to read session data: redis (path: tcp://redis-labs:port?auth=password) at /var/www/html/lib/private/Session/Internal.php#222

GET /apps/recommendations/api/recommendations
from some_ip at 2024-08-21T11:54:27+00:00

Has anyone had any experience running Redis in AWS, or using Redislabs? Any tips on how to tune / debug this?

I reverted to running Redis within my cluster and everything works fine. Looks like having a Redis labs instance in a separate region is too much latency… hope this helps someone else

1 Like

Extremely low latency and highly reliable connectivity between your app instances and Redis is definitely important.