Print to PDF is getting Timeout error

when click the print to PDF on the invoice page. The PDF conversion does not take place and throws the 504 Gateway Time-out.

2019/03/22 14:41:08 [error] 483#0: *556 upstream timed out (110: Connection timed out) while reading response header from upstream, client: x.x.x.x, server: site1.local, request: “GET /api/method/frappe.utils.print_format.download_pdf?doctype=Sales%20Order&name=SO3-0461&format=Standard&no_letterhead=1&_lang=en-US HTTP/1.1”, upstream: “”, host: “”, referrer: “

Usual culprit is high resolution images in the document. Try by removing the image or reducing the resolution.


Hi @Muzzy,

there are no images on the invoice just text.

If you click PRint, the Print to File, does it render a pdf file ?

Is it a custom print format?

This thread my help:

changed all the option mentioned in the thread, but still the problem persist.