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

Facing internal server errors on PDF Services API

Community Beginner ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

It seems that the Adobe API endpoint for converting DOCX to PDF files suddenly starting responding with ‘Internal Server Errors’ like the following at about 11:35 UTC yesterday (26 Oct):


ServiceApiException [message =An Internal Server Error has occurred.; transactionId=JThRBbTnKBb7sEWccpLnw2K9ZpQfaDsH, requestId = uTxjoJosgnxr9ZhRR4cY26baeJ6JKyai, httpStatusCode = 500, errorCode = INTERNAL_SERVER_ERROR]

 

We’re using the .NET Adobe.DocumentServices.PDFTools API client version 1.3.0

 

At about 15:16 UTC on 26 Oct we were able to stop the internal server errors by no longer setting the following options on the CreatePdfOperation:

 

CreatePDFOptions.WordOptionsBuilder().WithDocumentLanguage(targetLanguage.ToSupportedDocxDocumentLanguage()).WithCreateTaggedPDF(false).Build();

 

Could you help us understand why your service suddenly started responding with internal errors to all our DOCX to PDF conversion requests with these options set?

 

Also, in our metrics we see time periods where the conversions through the Adobe API are very slow, e.g. PDF to DOCX conversion around 07:30 UTC this morning. Is this a server resource problem on your side? Could you support us in getting better, more consistent performance out of the API?

 

TOPICS
PDF Services API

Views

5.5K

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 ,
Oct 27, 2021 Oct 27, 2021

Copy link to clipboard

Copied

This should be fixed now - please let us know if not.

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

ServiceApiException [message =An Internal Server Error has occurred.; requestId=bffcaf76-cd3b-4002-a5a0-119203cf1a4a, requestId = bffcaf76-cd3b-4002-a5a0-119203cf1a4a

 

 

I'm getting this. 

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

Still issue persist 

ServiceApiException [message =An Internal Server Error has occurred.; requestId=bffcaf76-cd3b-4002-a5a0-119203cf1a4a, requestId = bffcaf76-cd3b-4002-a5a0-119203cf1a4a

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

Hi, this is a very old thread, so please start a new one. I just tested our REST APIs and can't reproduce the issue. I also checked our API status (https://status.adobe.com/products/503500), and nothing is showing up. If you can describe more about what you are doing (what operation for example), I can try to help.

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

I generating 500 pages of html content to memory steam then passing that
steam. While doing htmltopdfoperation operation I'm getting the error.
For reference I have provided the code snippet below. Highlighted code
throwing the error.
Note: 50 pages or 100 pages is getting generating as pdf. But when I'm
taking 500 pages facing the issue.



var content = await _requestService.RecordsReports(request, PageSize,
PageNo);
if (content != null)
{
Credentials credentials =
Credentials.ServicePrincipalCredentialsBuilder()
.WithClientId(_configuration["ClientId"])
.WithClientSecret(_configuration["ClientSecret"])
.Build();

//Create an ExecutionContext using credentials and
create a new operation instance.
ExecutionContext executionContext =
ExecutionContext.Create(credentials);
CreatePDFOperation htmlToPDFOperation =
CreatePDFOperation.CreateNew();
MemoryStream stream = new
MemoryStream(content.ToArray());
// Set operation input from a source file.
FileRef source = FileRef.CreateFromStream(stream,
"text/html");
htmlToPDFOperation.SetInput(source);
// Provide any custom configuration options for the
operation.
SetCustomOptions(htmlToPDFOperation);
// Execute the operation.
*FileRef result =
htmlToPDFOperation.Execute(executionContext);*

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

No Ratmond. Still I haven't hitted the page limit. 

Dev34285267luog_0-1702666598654.png

 

Yesterday I generated two pdf with 416,524 pages of content. Today also I'm able to generating 100 pages of pdf. but today when I'm trying to generate 500+ pages of  content i'm facing the issue.

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

That's a transaction limit. We limit the total number of pages - also on file size. Your HTML input may be over the 100meg size.

 

Also, honestly, there is no way you generate 416 *thousand* pages of content between 2 PDFs. Did you really?

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

Yes I Did, Yesterday I have geneated the file. file size was 15.5MB. For your reference you can see below one.

Dev34285267luog_3-1702667719179.png

 

 

Dev34285267luog_1-1702667498944.png

 

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 15, 2023 Dec 15, 2023

Copy link to clipboard

Copied

So to be clear, was it the same file yesterday and today? You said file size was 15.5 - that was for today as well? Can you send me the HTML file?

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 17, 2023 Dec 17, 2023

Copy link to clipboard

Copied

Yes it is same file.
Suppose If I have 100 records the html page will be copied to 100 times, if it 300 reocords then it will copied 300 times...

I attached html file in doc format for reference

 

 

 

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, 2023 Dec 18, 2023

Copy link to clipboard

Copied

Nothing really stands out as problematic in the HTML. Honestly, I still think generating 416K pages of PDFs is going to be an issue with our limits. So a few things come to mind. I see you are using one of the SDKs. If you switch to using the REST API does it work better? 

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, 2023 Dec 18, 2023

Copy link to clipboard

Copied

Hey Raymond its not 416K pages. 
one pdf genereated with 416 pages and another pdf with 524 pages.

html template has two pages.

One page is for details another page for log table( in worst case If I have more logs then page count may increase)
416: here I have total 213 records. so 213*2=416
524: here I have total 262 records. so 262*2=524

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, 2023 Dec 18, 2023

Copy link to clipboard

Copied

I'm confused. The HTML you sent looked to be static. So are you modifying the HTML before sending it, or using the Dynamic HTML API feature?

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, 2023 Dec 18, 2023

Copy link to clipboard

Copied

Dont get confused. I have static html template which I shared to you. with my API service Im getting some data records from database and then binding the data to html template with mappings [%data%] in html template.

Each datarecord mapped to html template. Suppose my API service return 50 records it will looped 50 times and then modifying html template. finally sending that modified html to PDF service.

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Hey Raymond

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

So 50 calls to the static HTML to PDF endpoint. Maybe you can send me a zip of the files to try? Also, have you tried hitting the REST API directly?

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

No, I'm not calling 50 times(Here 50 is just example--> 50 count may vary  to 100 or 200 or 300 etc).

html is appending 50 times and final html content i'm passing to adobe api service.

FileRef result =htmlToPDFOperation.Execute(executionContext);

 

above line throwing the exeption.

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Honestly I'm trying real hard to grok what you are doing and I'm failing. So - you do _something_, I honestly don't think it matters, and you are sending ONE HTML doc to convert and get the error now consistnently. Right?

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Yes but that error is not getting all the times.
just now I tested with 108 records the pdf was generated, then I tested with 150 records it get failed and throws the exeption.

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Remember that I don't necessarily care about the # of records, just the HTML you are sending. If you get the issue consistently with that 150 record one, can you send me the one HTML document so I can try?

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Raymond I attached the html content in sample.txt file

in my requirement I'm converting that hole html to memorysteam then passing that memory steam to adobe api service. 

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

I must still be confused. You shared an HTML template. You said, I believe, you use logic on your server to conver that into a larger document.

 

If that statement is true, for me to re-create your issue, I need the *generated* large document causing the issue.

 

Ie, I need what you send to us. Not what you start with.

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 19, 2023 Dec 19, 2023

Copy link to clipboard

Copied

Yes, I have some logic on my server to convert that html to larger memory steam. I'm not saving that generated memory steam any where. I'm directly passing that generated memory steam to Adobe pdf service api  by my code logic.

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