Django Redis connection error in heroku: Error 110 while writing to socket. Connection timed out

Viewed 2421

I'm using Redis for caching in my Django project which is hosted on Heroku.

During Redis connection, on random times I got the below error message

Error 110 while writing to socket. Connection timed out.

I'm using the below packages with versions

  • python-3.6.8
  • Django-2.2.2
  • redis-3.2.1
  • celery-4.3.0

Also, I'm access Redis using worker ( celery sometimes).

Can someone please suggest me to get rid of this problem or any other countermeasure to handle this problem.

Thanks in advance...

1 Answers

There are several possible causes for this--the most usual occurs where you have lots of cache evictions caused by the maxmemory setting on redis being too low. Check to see your redis size using the redis-cli stats command and see if you need more memory to redis.

Related