Fix sql error with threads number not defined in agent xml.