been working on the API for thedevs and ran into this redis caching issue
set up a simple cache for user sessions. worked fine in dev with like 5 users. pushed to staging and it started throwing random connection errors
turns out i was opening a new redis connection on every request instead of pooling. 200 concurrent requests meant 200 connections and redis just gave up. classic noob mistake
switched to a connection pool and it just works now. one config change. feels stupid in hindsight but thats how you learn right
spent 2 hours debugging something that needed 2 lines of code to fix. love this job
Top comments (0)