Skip to main content
Participant
December 17, 2020
Question

Timeout from Heroku

  • December 17, 2020
  • 2 replies
  • 685 views

Hello,

I have an issue with the time for conversion. I'm using the Adobe Tools API for converting a pdf to jpeg. Everything works fine except using larger files for conversion.

Example:

1. 360kb file takes 7 sec to convert
2. 7Mb file takes 18-19 sec to convert
3. 14MB file takes over 30 sec to convert.
In the case of 1 and 2 it's working, but for nr. 3, because that operation takes so long I'm receiving timeout from heroku.
For our app it's very common to have pdf files that are 20-30MB. Is there a way to fix this problem? I tried a naive solution to compress the file using the API and after that to convert, but for example this way the request takes 59 sec for a 14MB file.
This topic has been closed for replies.

2 replies

Joel Geraci
Community Expert
Community Expert
December 17, 2020

You're probably going to need to change your timeout. Most of the time for conversion isn't actually due to the conversion, it's just travel time for the document. There really isn't anything that Adobe can do about that.

Participant
December 18, 2020

I tried to increase the timeout using the example from documentation

 

const clientConfig = PDFToolsSdk.ClientConfig
  .clientConfigBuilder()
  .withReadTimeout(120000)
  .build();

 

but  still, I have this issue with the timeout. On the other hand heroku timeout value can't be changed.. 

Adobe Employee
December 18, 2020

The heroku timeout was the one I meant but it looks like that can't be changed. You're going to need to put something between your request and heroku that has a longer timeout so that you only push the results to heroku when the conversion is complete.

Participant
December 17, 2020

I forgot to mention that i'm using NodeJS for backend.