[英]Nginx 502 FastCGI Error
當我嘗試訪問服務器上的某個頁面時,它返回502網關錯誤。 (有時它可以工作,但隨后我重新加載該頁面,並再次顯示502 Gateway頁面)。
如果我檢查nginx錯誤日志,則會出現此錯誤:
2017/09/13 19:14:49 [error] 3762#3762: *22 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: serverip, server: localhost, request: "GET /inventory.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "localhost", referrer: "localhost"
我嘗試在Google上查找錯誤,但到目前為止還沒有解決方案,想知道是否有人知道錯誤是什么以及如何解決。
謝謝。
fastcgi_buffers 16 16k;
fastcgi_buffer_size 120k;
嘗試增加以下設置的值:
fastcgi_buffer_size
fastcgi_buffers
https://nginx.ru/zh-CN/docs/http/ngx_http_fastcgi_module.html#fastcgi_buffer_size https://nginx.ru/zh-CN/docs/http/ngx_http_fastcgi_module.html#fastcgi_buffers
我在nginx配置中使用了以下代碼並重新加載nginx,解決了我的問題-
fastcgi_buffers 16 16k;
fastcgi_buffer_size 120k;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.