ffb268e v0.5.1 will fail if a database connection is closed.
Apache's mod_wsgi may restart the processes onces in the while, so there is some self healing.
Simple test to reproduce:
systemctl restart postgresql.service in a running contactdb_api results into
cur = contactdb_conn.cursor(cursor_factory=RealDictCursor)
psycopg2.InterfaceError: connection already closed
Technical idea:
Use psycopg2.pool.ThreadedConnectionPool().
This might also help to speed up access and use multiple threads with wsgi,
which would need an update in the Apache config instructions.
ffb268e v0.5.1 will fail if a database connection is closed.
Apache's mod_wsgi may restart the processes onces in the while, so there is some self healing.
Simple test to reproduce:
systemctl restart postgresql.servicein a running contactdb_api results intoTechnical idea:
Use psycopg2.pool.ThreadedConnectionPool().
This might also help to speed up access and use multiple threads with wsgi,
which would need an update in the Apache config instructions.