diogobaeder/pycket — Issue #2: Documentation Request: Redis Connection Pool
Author: whardier
Created: 2012-02-23 21:36:43+00:00
State: open

The following works and is worth noting. This is **IMPORTANT** to keep pycket from reconnecting for **EVERY** request which can eat up your ulimit very quickly. I tested this by making a sample app, threading out 10 times, then using ab with 100000 requests and 100 concurrent requests.

Also.. this makes good use of the pass through settings that pycket does to the driver.

``` python
pycket_pool = redis.ConnectionPool(max_connections=10, host=options.redis_host, port=options.redis_port)
#...
**{
'pycket': {
'engine': 'redis',
'storage': {
'connection_pool': pycket_pool,
'db_sessions': 10,
'db_notifications': 11,
},
'cookies': {
'expires_days': 120,
},
},
}
#...
```