django-balancer
django-balancer copied to clipboard
Slave connection not present
I've found a small issue in the balancer.
I've got the following configuration:
- Two DB servers (postgres replicated with streaming) -- let's call them master and slave
- Three seperated instances of the same projects running on three diferent machines
And the DB connections are defined as:
- First instance of my app is balanced over 2 DB servers
- Second instance is connected to master DB server
- Third instance is connected to master DB server
When ussing pinning routers it looks like the Second and Third instances are trying to use slave connection, while thre's no info about it in the settings.py I gues that this is stored somewhere with the session (I've been using PinningSessionMiddleware)... Anyway, I'm having the ConnectionDoesNotExist: The connection slave doesn't exist error.
I've switched to .WeightedMasterSlaveRouter and we'll see if the problem still occurs.