Export PDF failed for Quotation, Sales Order etc

Hello,
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.
Preview

PDF export output
2017-09-21_20-45-40

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

  1. Add host name in the site_config.json
    2017-09-21_20-46-55
  2. Full permission provided for all folders and files in the site
    2017-09-21_21-12-24
    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’.