I followed all of the steps in the README to configure Django to use this library for pooling but when monitoring the connections I couldn't see the pooling behavior.
After some debugging, I couldn't see anywhere that was using db_pool to get connections so I patched base.py and overrode get_new_connection on DatabaseWrapper as follows:
With this patch it seems the pooling is working as expected. I can see the connections being reused and the checkout|checkin|connect log messages that I couldn't before.
Has something changed in Django that could have broken this (I couldn't see anything with a quick look through history)?
I followed all of the steps in the README to configure Django to use this library for pooling but when monitoring the connections I couldn't see the pooling behavior.
After some debugging, I couldn't see anywhere that was using
db_pool
to get connections so I patchedbase.py
and overrodeget_new_connection
onDatabaseWrapper
as follows:With this patch it seems the pooling is working as expected. I can see the connections being reused and the
checkout|checkin|connect
log messages that I couldn't before.Has something changed in Django that could have broken this (I couldn't see anything with a quick look through history)?