I am using redis to save/update/delete data for my web socket server (Implemented using autobahn - twisted based web socket implementation) according to the messages I get from my server clients. For Redis operations I am using redis-py package. When there is more number of concurrent clients connecting to my server, I could see requests served in synchronous manner. I found redis operations blocks server from handling parallel client requests. Why is this happenimg ? How can I solve this issue ? I am doing redis operations from onMessage function of autobahn protocol class.
Asked
Active
Viewed 238 times
0
-
Your question as is is underspecified. Please add more details on what precisely you're doing. – gzost Oct 07 '15 at 10:37
-
@gzost I have updated my question. Please check. – Bill Goldberg Oct 07 '15 at 11:55
1 Answers
0
I found the root cause by googling. Issue was the python package I was using for Redis operation (redis-py) was designed in synchronus manner. So twisted server main thread was in blocking state during data fetch/update from Redis. Now I am trying the twisted based asynchronus package for Redis called txredisapi instead of redis-py in twisted way using defer package.

Bill Goldberg
- 1,699
- 5
- 26
- 50