I am using a stored procedure to bulk insert documents which is taken from the documentation sample.
The documents are inserted every minute in batches, performance level of collection is S2. After about 15000 documents are inserted over a period of a few days, my stored procedure consistently gets blocked and I get the following exception:
Microsoft.Azure.Documents.ForbiddenException, message: {"Errors":["The script with id 'xxx' is blocked for execution because it has violated its allowed resource limit several times."]}
However, it's completely unclear what exactly I am violating - number of requests? Total number of documents? Document's size? By looking at the DocumentDB limitations and description of performance levels I can't figure out what limitation I am hitting and what I can do to fix it. Neither do I get any warnings or alerts in the Azure portal...
What do I do in this situation? Go round-robin with multiple stored procedures ;) ?