How to Fix 504 Gateway Timeout using Nginx!

Currently I am trying to use my summarizer service with my orangepi. I was getting 504 Gateway Timeout errors all the time, because orangepi is slow for calculations. I thought it is related with Finatra , but found out it was Nginx. It has default 75 seconds. For fixing it, you have to create ne file and then restart nginx service.

create /etc/nginx/conf.d/timeout.conf file

proxy_connect_timeout       600;
proxy_send_timeout          600;
proxy_read_timeout          600;
send_timeout                600;

Now It will wait 5 minutes!

sudo systemctl restart nginx.service