observed some deadlock issues in db, added debug logging