<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hello everyone<br>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) </div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
The simplest version of my code was included in the attachment. </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
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). </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Here's my output:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<div>2012-09-28 23:00:31+0200 [-] Log opened.</div><div>2012-09-28 23:00:31+0200 [-] Factory starting on '/tmp/redis_test.sock'</div><div>2012-09-28 23:00:31+0200 [-] Starting factory <twisted.internet.protocol.Factory instance at 0x1fc77a0></div>
<div>2012-09-28 23:00:31+0200 [RedisWorkerProtocol,0,] New connection</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
After waiting 15 minutes, nothing more has been shown.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
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. </div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Thank you in advance and have a great weekend!</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
--</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Best regards,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Arkadiusz Rz.</div>