When running the unit tests on a postgres database, the following error shows:
sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 30
We've also seen this error from time to time on the instance running at
llvm.org/perf, and it was unclear what the exact reason was for this. Now that
we can run the unit tests on postgres, this shows that not closing the db
connection at the end of a request is at least one of the reasons this error
can be produced.
This builds on http://reviews.llvm.org/D13163, which makes it possible to run the unit tests on postgres instead of sqlite.