How to increase page timeout to prevent 504 error?

15,598

fastcgi_read_timeout should be put into a location which you're using for processing requests to your file.

location {
     fastcgi_pass you.app:9000;
     ... 
     fastcgi_read_timeout 900s; # 15 minutes
}

Please, see more examples in documentation

Share:
15,598
rajankaneria
Author by

rajankaneria

Updated on June 23, 2022

Comments

  • rajankaneria
    rajankaneria about 2 years

    I am running a file with considerable amount of code and have to process it for 1000 users. It takes approximately 55 seconds to process 500 users, so I have to increase the default gateway timeout time.

    From this question, I found that I have to increase fastcgi_read_timeout, but I don't know where to put it in fastcgi.conf.

  • anoraq
    anoraq over 11 years
    if jquery available, that is.
  • snakesNbronies
    snakesNbronies about 6 years
    Despite the existence of the word jquery, this is a much more sound solution than increasing the nginx timeout to some absurd value.