You are viewing limited content. For full access, please sign in.

Question

Question

API Import timeout (500, unknown)

asked on February 23

When setting the pdfOptions to generate text and pages on import (/v2/Repositories/{repositoryId}/Entries/{entryId}/Folder/Import), like so: 

 

  "pdfOptions": {
    "generateText": true,
    "generatePages": true,
    "generatePagesImageType": "StandardColor",
    "keepPdfAfterImport": true
  }


  
 I'll get a 500 response on a moderately sized sample file  (~8mb, 200 page PDF):

 {
    "type": "unknown",
    "title": "Error: Import timed out.",
    "status": 500,
    "instance": "/repository/v2/Repositories/--removed--/Entries/--removed--/Folder/Import",
    "operationId": "--removed--",
    "errorSource": "Api Server",
    "errorCode": 999,
    "traceId": "--removed--"
}

This is frustrating because the entry is actually successfully created in the Cloud Repository with the efile fully imported but the page generation is timing out 125-ish pages in (assuming there is a 60-second timeout set), resulting in a 500 error response. Since the 500 response does not contain any entry information, how do I handle this? If I retry, I'll end up with duplicate entries with different page counts. Is there an option to remove the entry if the page generation fails to complete? Is there a way to extend the server timeout to allow the page generation piece to complete? Or, is there a separate call to trigger the page generation after the successful import?

Thanks!

0 0

Replies

replied on February 26

I've taken note of this use-case and we'll work on providing an improved message when a timeout is experienced.  You may want to use the ImportUploadedParts route as that supports larger (and longer) file uploads. But I will look into how we can improve the experience of the Import route when page generation is enabled.

 

Andrew

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.