Using API Uncaught Server encountered exception

,

Hello there,

All of sudden I am getting this error,

Uncaught Server encountered exception: Maximum number of threads throttled

PHP Fatal error: Uncaught Server encountered exception: Maximum number of threads throttled
Attempted: 1 time(s).

The interesting thing is it works occasionally.

Please find the code below which is from PHP SDK
do {
if ($attempts > 0){
if (class_exists(‘CakeLog’) && $attempts > 1){
$lastAttemptFaultCode = $req->faultCode();
$lastAttemptFaultString = $req->faultString();
}
sleep(5);
}
$attempts++;
$req = $this->client->send($call, $this->timeout, ‘https’);
} while($retry && ($req->faultCode() == $GLOBALS[‘xmlrpcerr’][‘invalid_return’] || $req->faultCode() == $GLOBALS[‘xmlrpcerr’][‘curl_fail’] || strpos($req->faultString(), ‘com.infusionsoft.throttle.ThrottlingException: Maximum number of threads throttled’) !== false) && $attempts < 3);

$this->totalHttpCalls += $attempts;
if (!$req->faultCode()){
$result = php_xmlrpc_decode($req->value());
} else {
$result = array();
}

	if ($req->faultCode()){
		$exception = new Infusionsoft_Exception($req->faultString() .'Code'.$req->faultCode().' invalid_return '.$GLOBALS['xmlrpcerr']['invalid_return'].' curl_fail '.$GLOBALS['xmlrpcerr']['curl_fail']."\nAttempted: $attempts time(s).", $method, $args);
		$this->addException($exception);			
		throw $exception; 
		return FALSE;
	}

Any idea?

Thanks in advance.
Rahul

Hi, @Pavan_Peri,

That message should only come up under one of two conditions. Either exceeding the number of calls per second or exceeding the number of calls per day (see image from keys.infusionsoft…)

image

@John_Borelli
Thank you for your reply here.
Can you tell me where I can track that limits, please?

There is a “View Reports” button on the key management page:
https://keys.developer.infusionsoft.com/apps/mykeys