Export PDF failed for Quotation, Sales Order etc

We have port based multi tenant production deployment in a cloud server. Site 1 is working perfectly, but in the Site2, PDF export faild with all transaction like Quotation, Sales Order etc. getting “504 Gateway Time-out” after 3-4 minutes. However preview is showing correctly, only problem with PDF export.

PDF export output

As per different solution get from the forum, Following steps already did without success

  1. Add host name in the site_config.json
  2. Full permission provided for all folders and files in the site
    3.Upload Letter Head in public folder

Please help us to resolve this issue

It is resolved with Create new Setup->Letter Head record and make this one as ‘Default’.