I use Nginx Django FastCGI to run a service to process a huge XML. The file is too large and the processing is slow. It times out halfway through the process.
I changed the Nginx configuration. It was originally 60 and changed to 120, but it seems to have no effect. It still times out in 60 seconds.
location ^~ /api/ { proxy_read_timeout 120; proxy_connect_timeout 120; fastcgi_pass 127.0.0.1:8080; }
Is there anything else that needs to be changed?
should use:
These two options.
fastcgi_read_timeout refers to the timeout of the entire process of sending a response from the fastcgi process to the nginx process
fastcgi_send_timeout refers to the timeout of the entire process of the nginx process sending a request to the fastcgi process
Both options default to seconds (s) and can be manually specified as minutes (m), hours (h), etc.
For pages that take a long time to process events, it is best to change to asynchronous processing. The connection time of Nginx does not seem to exceed 75 seconds.
http://wiki.nginx.org/HttpFastcgiModu...
proxy is the time for the proxy to communicate with the backend, and the fastcgi timeout needs to be modified
Check if it is 504 or 502