In early August 2019 Microsoft began throttling API requests to the cloud-based Business Central web services. The limit was changed from 1,000 API requests per second to 300 API requests per minute in Sandbox environments and 600 requests per minute in Production environments. (this covers both ODATA and SOAP requests).
If you use SmartConnect, and hit this limit, you will see one of the two following error messages.
Unable to call service: Unexpected character encountered while parsing value: R. Path '', line 0, position 0.
Failed to create record.Unable to call service: The remote server returned an error: (429).
Resolution
Microsoft can increase the limit on an individual Business Central tenant. You can reach out to Microsoft and request to have the API limit increased for your Business Central tenant.
As a workaround in SmartConnect, you can use a sleep command in the Restriction to tell SmartConnect to pause while processing so the records are not imported too quickly.
SmartConnect on-premise
Threading.Thread.Sleep(500)
SmartConnect.com
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}
sleep(500);
return true;
Our development team is investigating the issue and evaluating options to work within the constraints of the web services.
If you have any questions, please contact our support team at support@eonesolutions.com