• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Timeout from Heroku

Community Beginner ,
Dec 16, 2020 Dec 16, 2020

Copy link to clipboard

Copied

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.
TOPICS
PDF Services API

Views

343

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 17, 2020 Dec 17, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2020 Dec 17, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

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.. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 18, 2020 Dec 18, 2020

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources