0

After i changed the port of my node js application from 3000 to 3001 , some of the resources in few of the pages don't load completely ultimately leading to 504 Gateway Time-out (nginx/1.10.3(Ubuntu) ) . Upon further investigation in the nginx log files :

2019/09/19 19:54:33 [error] 14156#14156: *690847 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 128.227.1.21, server: lims.rgportal.com, request: "GET /projects/59e133a53e785ff00550cee7/tempPlatePools HTTP/1.1", upstream: "http://127.0.0.1:3001/projects/59e133a53e785ff00550cee7/tempPlatePools", host: "lims.rgportal.com", referrer: "https://lims.rgportal.com/"

Please help !!!

4
  • "upstream timed out" is telling you that nginx could not get your node js app to provide the requested items.
    – Art Hill
    Commented Sep 20, 2019 at 20:53
  • From the server, can to so a "curl 127.0.0.1:3001/projects/59e133a53e785ff00550cee7/tempPlatePools" or a "wget 127.0.0.1:3001/projects/59e133a53e785ff00550cee7/tempPlatePools"?
    – Art Hill
    Commented Sep 20, 2019 at 20:55
  • Is it possible that you only changed the nginx config, but did not change the node js config to also be on port 3001? Did you forget to restart node js?
    – Art Hill
    Commented Sep 20, 2019 at 20:58
  • Thank you so much for the feedbacks @ArtHill , i got it figured out finally, i had to add 4 additional lines in the nginx.conf file for the connect,send, read time out and then i restarted the nginx service. Commented Sep 23, 2019 at 13:44

1 Answer 1

0

I got it figured out finally, i had to add 4 additional lines in the nginx.conf file for the connect,send, read time out and then i restarted the nginx service.

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

and then reloaded nginx service : nginx -s reload

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .