Error Code 30-Time Limit Exceeded
  • 20 Sep 2023
  • 2 Minutes to read
  • PDF

Error Code 30-Time Limit Exceeded

  • PDF

Article Summary

Knowledge Base Article NumberProduct
KB001340DocFusion

     

Problem Description

Clients calling the API endpoint /api/DocFusionV2/GenerateDocumentFull get document generation request failures and receive an Error 30 - Time Limit Exceeded.

    

Why is this happening?

A new error Time Limit Exceeded (Error 30) has been introduced when the predicted time needed to generate the document exceeds the amount of time remaining based on the timeout set on the request. 

Every document generation request is put on a generation queue and the configured timeout (default 30sec) is calculated from the moment the job enters this queue. Timeouts are then handled as follows:

  • If the job times out while still in the queue, then Error 11 - timeout before the job could be started is returned.  
  • If the generation job is picked up from the queue and the job times out during generation, then Error 14 - Job timed out is returned.
  • (New Error) If the generation job is picked up from the queue and the predicted amount of time required to generate the document exceeds the time remaining before timeout then Error 30 - Time Limit Exceeded is returned.

How should I handle this?

Increase the timeout values in requests when calling /api/DocFusionV2/GenerateDocumentFull to compensate for time limits being exceeded (Errors 11, 14 or 30).

If increasing the timeout doesn't solve Error 30 then DocFusion may be experiencing high load or degradation in service. Please check the DocFusion Service status page. Alternatively, you can contact support.

Other Considerations

Depending on your use case, if you do not require synchronously generating a document, you should consider using the queued generation method by calling /api/DocFusionV2/QueueJobForGeneration to queue a generation job and then calling /api/DocFusionV2/GetQueuedJobGenerateResult to retrieve the generated document when it is doneBy using this approach, the generation job is added to a long-running queue where the timeout only starts calculating from the moment the document generation starts. In this scenario errors 11 and 30 are no longer applicable, however, timeouts could still occur, resulting in error 14. This approach will require changes to your code to handle the asynchronous nature of this endpoint and is not applicable to all implementations but is mentioned here as a possible alternative.

It is also worth noting that when using the /api/DocFusionV2/GenerateDocumentFull endpoint, DocFusion might blacklist templates that take a very long time to generate. In these cases, you might find that you no longer receive errors 11 and 30 but generally, documents take much longer to generate or might fail with Error 29 - Template Blacklisted. If you have queries or concerns about blacklisted templates, please contact support

 

   



Was this article helpful?