HIVE gateway timeout. Immediate help needed

Hello, I’m unable to execute queries in HIVE on HUE. The error message is as follows “504 Gateway Timeout 504 Gateway Time-out nginx/1.12.2”
Please find the screenshot below. Please help soon.