limit the ajax calls to MAXRETIRES to stop infinite request loop from happening when service interution exists