We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

504 Gateway Time-out when merging PDFs

Hi there,

I’m using the Node SDK to merge PDF files using putMergeDocuments. When invoking it, the method works as expected and it does merge the files. However, it takes a lot of time to receive a response (I’d say around 5 minutes), and the response I receive is a 504 gateway time-out.

I have tried Dropbox and Internal storage, in both cases files are merged but the response is the same. Any way to avoid this long response? As it really slows down the workflow.

I look forward to your reply.

Thanks.

@epapert

We are sorry for the inconvenience. Please share your sample documents along with the code. We will try to reproduce the issue at our end and guide you accordingly.

Hi Tilal, thank you for looking into this. Please find a code sample I made, I just tested it and the behavior is the same:

const { PdfApi } = require("asposepdfcloud");
const { MergeDocuments } = require("asposepdfcloud/src/models/mergeDocuments");

pdfApi = new PdfApi("xxxxxxxxxxxxxxxxxx", 
"xxxxxxxxxxxxxxxxxxxxxx")

const modules = ['combineFilesInput1.pdf','combineFilesInput2.pdf','combineFilesInput3.pdf'];
const resultName = 'Output.pdf';
const mergeDocuments = new MergeDocuments();
mergeDocuments.list = [];

modules.forEach((file) => {
    mergeDocuments.list.push(file);
});

pdfApi.putMergeDocuments(resultName, mergeDocuments, null, null)
    .then((result) => {
        console.log(result.status);
    }); 

`
For the record, I am using Dropbox as storage.

combineFilesInput1.pdf (939.7 KB)
combineFilesInput2.pdf (6.9 MB)
combineFilesInput3.pdf (187.9 KB)

Upon trying several times using the same files and code, I noticed that the behavior isn’t consistent. It always combines the files and the response sometimes is 200 ‘OK’ but most of the time is 504 gateway timeout.

This is the only step I am missing to be able to fully implement your service into my workflow so I am very much looking forward for a solution.

Thanks.

We have noticed the reported issue with your shared documents and opened the following new ticket(s) in our internal issue tracking system. We will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFCLOUD-3336

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.