Worker is disconnecting from database after a while