API Throttling ?

API Throttling ?

Hi Support,

I am processing about 800 rows of data.

I am looping through the data and doing a database API call (via Python Reports Client)

After about 100 or so calls, I get the following error

2016-01-06 22:28:37,196 q2msgbldr.service DEBUG   : Adding IO record [{'SeasonId': 2016, 'TransactionId': '1452119317196', 'ProcessingMessage': 'Queue2MsgBldr: Add / New Initial Create.', 'WeekId': 15, 'AthleteId': 2851}]
Traceback (most recent call last):
  File "queueToMessageBuilder.py", line 95, in <module>
    q2msgbldr.queueNewWeeksToMsgBldr()
  File "/mnt/task/PlanEngine/pushTrainingToDrupal/QueueMessageSvc.py", line 130, in queueNewWeeksToMsgBldr
    result = self.rc.addRow(self.msgIO_URI, messageIOData, None) 
  File "/mnt/task/com/adventnet/zoho/client/report/python/ReportClient.py", line 129, in addRow
    return self.__sendRequest(url,"POST",payLoad,"ADDROW",None)
  File "/mnt/task/com/adventnet/zoho/client/report/python/ReportClient.py", line 31, in __sendRequest
    raise ServerError(respObj)
com.adventnet.zoho.client.report.python.ReportClient.ServerError: u"Sorry, an unexpected error occurred when performing this operation. The error has been logged and will be looked into.\n\nIt would be of great help if you could provide us with additional information using the ''Feedback'' link at the top of this page."




The program, looks for all records ready to publish and then publishes to a Message Queue.   The system listening on the other end of the Message Queue can only handle 1 row per message (basically.)

Because I need an acknowledgement for each message, I am adding a row to my Zoho Database for each message, with the Message Id (assigned by the middleware.)


This happens quite frequently when we are processing more than 10, 20, 30 records.... however, based on the error message it is very hard to figure out what is happening.

com.adventnet.zoho.client.report.python.ReportClient.ServerError: 

Do I need to build in some sort of "Back-Off" after a 50 consecutive API calls or something ?

Any help much appreciated.

Cheers,
Tyler