Add database connection to ensure connect to database in other thread