sql connection queue count check