Comment 12 for bug 1307434

Revision history for this message
Michael Foord (mfoord) wrote :

This looks like several different bugs, or more specifically the same issue surfacing in several different places. We believe that the underlying cause is due to juju holding onto a single session to mongo - so if this connection dies everything is irredeemably broken. The best fix is to open a new session whenever we need it, and use the underlying socket pooling provided by the mgo driver. Unfortunately our watcher architecture (and the state itself) all hold onto an indirect reference to this session via mgo collections. So it needs a bit of "unpicking" to resolve.

This (short) email thread is a useful reference on the topic: https://groups.google.com/forum/#!topic/mgo-users/iZeiKgonGDU