PDF cloud API: some requests take very long / timeouts

We’re using the PDF cloud API to upload, convert and download PDF files.
In the recent week(s), the performance of this API is very instable, resulting in some requests being handled normally (with a response within seconds), while others can take a minute or even longer to respond.

We use the following requests

  • PUT on https://api.aspose.cloud/v3.0/pdf/storage/file/{path}
  • repeatedly GET on https://api.aspose.cloud/v3.0/pdf/{file}/pages/{number}/convert/png
  • DELETE on https://api.aspose.cloud/v3.0/pdf/storage/folder/{path}

I created a script that performs these requests and measures the response time.
This proves that some calls take around a minute to succeed. Interesting in that respect is that normal response time is around 1 second and the requests that take longer are always at around 60 seconds + a little bit.

The script and an example PDF with 10 pages are attached here: AsposePDFIssue.zip (15.4 KB). Fill in the client_id and client_secret before running the script.

And here’s some example outputs of the script with the problematic requests highlighted. This proves that it is random and does not depend on the PDF content.

Got bearer token: 0.7214765000000001s
Uploaded presentation_10_slides.pdf: 1.037693s
Converted page 1: 0.9693908999999998s
**Converted page 2: 61.393300599999996s**
Converted page 3: 1.1667901s
**Converted page 4: 61.664027399999995s**
Converted page 5: 1.1803079999999824s
**Converted page 6: 62.4722635s**
Converted page 7: 1.124041200000022s
Converted page 8: 1.616950399999979s
Converted page 9: 1.4690037000000018s
Converted page 10: 1.0940741000000003s
Reached end of file
Got bearer token: 0.7325591s
Uploaded presentation_10_slides.pdf: 0.9040683999999999s
Converted page 1: 5.4563171s
Converted page 2: 0.9637957000000004s
Converted page 3: 0.9677045s
Converted page 4: 0.9525687000000005s
**Converted page 5: 61.02405370000001s**
Converted page 6: 1.4895530999999949s
Converted page 7: 0.9399642999999998s
**Converted page 8: 62.8755017s**
Converted page 9: 1.2989376000000163s
Converted page 10: 3.2490191999999922s
Reached end of file

PS: You might have to run the script multiple times. In my case, about every 5th run was smooth…
PS2: Since this seems to be related to a load-balancing issue or similar, the following information might help: we send the requests from central Europe.

@nimagnaag

We are sorry for the inconvenience. I have noticed the issue and logged a ticket PDFCLOUD-3011 for further investigation and rectification. We will keep you updated about the issue resolution progress within this forum thread.

Running the script repeatedly, it seems that the issue has been resolved now. Can you confirm?

@nimagnaag

Thanks for your feedback. Yesterday, we have redeployed the Aspose.PDF Cloud containers with the new version. It seems the new release resolve your issue. We constantly working to eliminate the causes of over-allocation and memory leaks.

REOPENING this ticket with a slight change:

Now, a lot of conversion request get a error response (500) with

“Error”: {
“Code”: “internalError”,
"Message": “Exception of type ‘System.OutOfMemoryException’ was thrown.”,
“Description”: “Operation Failed. Internal error.”,
“DateTime”: “2022-09-01T20:01:25.4910589Z”,
“InnerError”: null
}

Example request ID: “RequestId”: “8d7c6110-8b23-428a-8cd5-2718421790f3”

Just use the same script as above with a small change towards the bottom to see the actual error:

      elif response.status_code==500:
        # fails with 500 if last page has been reached or an error occured
        page = 0
        response_json = json.loads(response.content)
        print(response_json);
        # "Invalid index" is end of file
        print("Reached end of file")

Example output:

Uploaded presentation_10_slides.pdf: 0.9247659998945892s
Error while converting page 1: Exception of type 'System.OutOfMemoryException' was thrown.
Error while converting page 2: Exception of type 'System.OutOfMemoryException' was thrown.
Converted page 3: 0.9685583999380469s
Converted page 4: 0.8048201000783592s
Error while converting page 5: Exception of type 'System.OutOfMemoryException' was thrown.
Converted page 6: 0.9806356998160481s
Error while converting page 7: Exception of type 'System.OutOfMemoryException' was thrown.
Error while converting page 8: Exception of type 'System.OutOfMemoryException' was thrown.
Error while converting page 9: Exception of type 'System.OutOfMemoryException' was thrown.
Converted page 10: 0.9482706999406219s

@nimagnaag

We are sorry for the inconvenience. We are looking into the issue and will fix it soon.

While the memory issues seem to be resolved for now, the initial problem with the 60+ seconds for a request came up again… :roll_eyes:

This is getting ridiculous. This service has stability issues every second week and you seem to repeat the same issues again and again… You should definitively verify/control your service quality.

1 Like

@nimagnaag

We are truly sorry for the inconvenience. We will further look into the issue for stability.