Redis socket timeouts causing Gunicorn worker crashes (Django on Railway)
Anonymous
PROOP

a month ago

We’re running into persistent 500 errors in production on Railway and trying to understand whether this is a Redis resource or networking issue.

Setup

  • Web: Django + Gunicorn

  • Redis: used via cacheops

  • PostgreSQL: separate container

  • All services deployed separately on Railway

What’s happening

When accessing our endpoint, the app crashes with 500.

From logs:

  1. Django template rendering calls a model property (active_scenario)

  2. That triggers a queryset wrapped with cacheops

  3. Redis call times out:

    RuntimeWarning: The cacheops cache timed out!
    Error: Timeout reading from socket
    
  4. Gunicorn worker times out:

    WORKER TIMEOUT
    Worker was sent SIGKILL
    
  5. Endpoint returns 500

What we tried

  • Restarted Redis service

  • Restarted Web service

  • Issue persists even after restart

  • PostgreSQL shows no critical errors

Questions

  • Has anyone seen Redis Timeout reading from socket issues on Railway recently?

  • Could this be caused by Redis RAM/CPU limits?

  • Is there a way to inspect Redis memory usage or connection counts on Railway?

  • Could this be an internal networking latency issue between services?

This is impacting our production admin interface, so any guidance would be greatly appreciated.

Thanks!

Closed

2 Replies

wow
PRO

a month ago

Basically same here, with Laraval executing something with Redis.

{"exception":{"\u0000*\u0000message":"Maximum execution time of 60 seconds exceeded","\u0000Error\u0000string":"","\u0000*\u0000code":0,"\u0000*\u0000file":"\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","\u0000*\u0000line":209,"\u0000Error\u0000trace":[],"\u0000Error\u0000previous":null,"\u0000Symfony\\Component\\ErrorHandler\\Error\\FatalError\u0000error":{"type":1,"message":"Maximum execution time of 60 seconds exceeded","file":"\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":209}}}

abreu
PRO

a month ago

I've been experiencing the same issue since around 3PM yesterday (in my case, with a Rails application using Sidekiq + Redis).


Status changed to Closed noahd 30 days ago


Loading...