django / channels_redis

Redis channel layer backend for Django Channels

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Connection reset by peer when upgrading redis-py to v5

vsobotka opened this issue · comments

Not sure if this is a bug or not, just wanted to share an issue we encountered with others. Earlier this year we upgraded redis-py for our app on Heroku from 3.9 to 4.5.4. We immediately ran into #235 and had to place in a workaround, with the ssl context. Everything went fine, until now, when we upgraded redis-py again, to 5.0.1. We immediately got "Connection reset by peer" error, preventing a stable connection. I was not able to find anything that would help. What helped us was to remove the workaround from #235 and use the newly supported option ssl_cert_reqs in layer config. So far this looks like it works perfectly well.

Thanks @vsobotka. Do you think there's a good reference to point folks to for the changes in redis-py?

@carltongibson No idea really. I was searching all over the place, mostly in redis related packages in our project and their GitHubs. Probably making an explicit note in #235 would inform people using this workaround that it's only good until they upgrade.

I'm getting a lot of system exists that seem to be related to redis (but not sure).

Just wanted to check if channels-redis==4.1.0 is supposed to work with redis==5.0.1 or if I should rather downgrade to a 4.x version, and if yes, which one?

Screenshot 2023-10-28 at 22 28 51

@toniengelhardt Good question. redis-py has been charging forward under us, and (for life reasons) I haven't had a chance to catch up with the exact state of play.

If you were to run the tests against each version, and report back, that would give us the base to clarify the advice. (If we need to we can pin channels-redis until we can adjust to update.)

@carltongibson unfortunately, I'm also more than busy with multiple projects, but I will downgrade to a redis 4.x version and see if that makes the errors go away and report back.