errors on db thread-safety