876c59b192
All Database usage must go through framework.db (which should have been the case before, anyways) or explicitly checkout and checkin a connection. Failure to do so causes thread starvation and bizarre random failures when attempting to use the database. This commit also explicitly releases database connections at the end of all threads created via framework.threads.spawn, which should alleviate Deprecation Warning messages from ActiveRecord. [Fixes #6613]