redis-py doesn't play well with multiprocessing
See original GitHub issueI have been struggling with several python redis commands raising various ResponseError exceptions or returning illegal values. In all cases experienced so far, the nature is intermittent and I have been using wrapper code to help capture some of the behavior , at https://gist.github.com/namoopsoo/b9f082e9eac025f7ec3b .
I have some initial symptoms documented here, on http://stackoverflow.com/questions/24168124/python-redis-responseerror-protocol-error-unbalanced-quotes-in-request .
As mentioned at the above, running redis server 2.8.10 from Homebrew on Mac OS X, and
(venvstage)$ pip freeze | grep redis
hiredis==0.1.3
redis==2.10.1
I do not have code available that someone could run to easily reproduce these errors, since I am just experiencing this in my personal code. But, if needed, I can try to provide more detail.
I have not ruled out that maybe my code is causing the crashes, but I wanted to post this up in case it rang a bell for someone else.
Another bit of output captured is in https://gist.github.com/namoopsoo/fea6157ad4197cf25f24 .
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (5 by maintainers)

Top Related StackOverflow Question
Is there any update on this? I’m also using redis with multiprocessing, and while I haven’t yet hit any issues, I’d sleep better knowing that it was safe.
From what I can see, ConnectionPool will reset itself if it detects that the PID has changed, which ought to address the multiprocessing case. On the other hand, that was already the case with 2.10.1, so presumably there is something else that led to this bug.
3.2.0 fixes the issues with forked processes. Sorry for the long wait.