an aggregator for blogs about MongoDB

PyMongo 2.6.3 Released

Grail tree

Bernie Hackett and I released PyMongo 2.6.3 this afternoon. It fixes some bugs introduced in 2.6.0 when we added major features to PyMongo's connection pool.

The headline fix is for a semaphore leak during connection failure: The connection pool decrements a semaphore when it creates a connection, but didn't increment the semaphore if the connection failed. If a long-lived Python process connected to MongoDB over a flaky network with frequent connection timeouts, the semaphore's value would reach zero and further connection attempts would hang. I fixed it with a big try/finally block that ensures we increment the semaphore if we can't connect.

I also fixed a sheer oversight of mine: Althoug...