How do I prevent a Gateway Timeout with FastCGI on Nginx

后端 未结 5 441
旧时难觅i
旧时难觅i 2020-11-27 09:04

I am running Django, FastCGI, and Nginx. I am creating an api of sorts that where someone can send some data via XML which I will process and then return some status codes

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-27 10:02

    In server proxy set like that

    location / {
    
                    proxy_pass http://ip:80;                
    
                    proxy_connect_timeout   90;
                    proxy_send_timeout      90;
                    proxy_read_timeout      90;
    
                }
    

    In server php set like that

    server {
            client_body_timeout 120;
            location = /index.php {
    
                    #include fastcgi.conf; //example
                    #fastcgi_pass unix:/run/php/php7.3-fpm.sock;//example veriosn
    
                    fastcgi_read_timeout 120s;
           }
    }
    

提交回复
热议问题