[Twisted-Python] Twisted + Redis-py + Connection Pooling

Arkadiusz Rzadkowolski a.rzadkowolski at gmail.com
Fri Sep 28 16:00:06 MDT 2012


Hello everyone
I am currently working on creating a complex python script which will be
using connection pooling from redis-py library (it will be working as a
backport Unix Domain Socket for redis 1.4, which doesn't support unix
sockets)

The simplest version of my code was included in the attachment.

I have a problem thought. Even if traffic is high (500+ requests per
second) there are no new connections started to redis (added print to
connection.py to trace it).

Here's my output:
2012-09-28 23:00:31+0200 [-] Log opened.
2012-09-28 23:00:31+0200 [-] Factory starting on '/tmp/redis_test.sock'
2012-09-28 23:00:31+0200 [-] Starting factory
<twisted.internet.protocol.Factory instance at 0x1fc77a0>
2012-09-28 23:00:31+0200 [RedisWorkerProtocol,0,] New connection

After waiting 15 minutes, nothing more has been shown.

Requests work just fine and always get a reply. I am curious though, why my
code doesn't initiate more connections to redis? Could you please shed a
light on this issue? Is it my code, redis-py simply doesn't need more
connections, or twisted works in my code as "one connection at a
time"? Really appreciate your reply.

Thank you in advance and have a great weekend!

--
Best regards,
Arkadiusz Rz.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20120929/a89cd224/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sock_test.py
Type: application/octet-stream
Size: 1462 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20120929/a89cd224/attachment-0002.obj>


More information about the Twisted-Python mailing list