Switch to single database connection per process, rather than per thread, to conserve memory