kobotoolbox / kpi

kpi is the (frontend) server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
https://www.kobotoolbox.org
GNU Affero General Public License v3.0
131 stars 176 forks source link

Mongo connection does not recover automatically #1034

Open jnm opened 7 years ago

jnm commented 7 years ago

Per https://www.flowdock.com/app/kobotoolbox/servers/threads/-77U0wrtL4G_Qp0yoHMLHCbxIsy, it seems that settings.MONGO_DB never recovers if the connection to Mongo dies. The app interpreter must be manually restarted for Mongo queries to work again.

Test that this is true, and make settings.MONGO_DB resilient if so (use a wrapper that tries to restart the connection if it's dead?).

jnm commented 7 years ago

I think my original hypothesis is wrong, but there's hope: http://blog.fejes.ca/?p=2496 https://jira.mongodb.org/browse/PYTHON-961