When using the Redis adapter for Phoenix PubSub, we’ve noticed client connections + messages to Redis being dropped, without consistent / continuous erroring. A few raises when broadcasting (which then go quiet), and some error logs from the connection callbacks.
It looks like the adapter does not propagate all errors, and handles a lot of the reconnection logic without passing the state on:
( phoenix_pubsub_redis/lib/phoenix_pubsub_redis/redis_server.ex at master · phoenixframework/phoenix_pubsub_redis · GitHub )
So,
- Anyone else have experience spotting / preventing / addressing these situations?
 - Is it better do use Redix/poolboy directly and skip Phoenix PubSub to get direct access to Redix’s connection error handling? ( Redix — Redix v1.5.2 )
 - With the default Phoenix PubSub Redis configuration, do we expect to have 5 (pool boy) + 1 (pub sub subscribe directly) client connections per adapter instance? For some reason we see ~13 from each app instance. If there’s no surprise sources of connections i guess we just have 1 more instantiation elsewhere in the app, rounding out to around 12.
 




















