All posts / tag
#rails
-
Debugging Redis::CannotConnectError in Ruby
Redis connection timeouts kept arriving in short bursts while the infrastructure graphs stayed clean. One client path had silently dropped the configured timeout when it built a new connection.
-
Dynamic per-user Rails debug logs, scoped to the request
A production bug affected one user, but enabling debug for the whole application would have buried the useful lines. This request-scoped override expired on its own and left everyone else's logs alone.
-
Tuning Rails log levels per class, without a redeploy
A production issue needed debug logs from one Rails class, not the whole fleet. The override had to work at runtime, expire cleanly, and cooperate with existing logger behavior.
-
Rolling PgBouncer without dropped queries
PgBouncer rollouts kept severing client sockets even though Kubernetes drained the pods correctly. The fix came from aligning client connection lifetimes with the proxy's shutdown window.
-
When config edits start feeling like deploys
A saved setting took up to thirty seconds to reach every worker. This design kept the database as source of truth and used a ConfigMap watch only to announce that something changed.