implement database-wide connection limit