nginx 499錯誤解決辦法
阿新 • • 發佈:2022-03-18
背景
介面效能壓測
架構
nginx+php_fpm+go
請求方法
POST
nginx返回資訊
狀態碼499
nginx 499定義
cat src/http/ngx_http_special_response.c
ngx_string(ngx_http_error_494_page), /* 494, request header too large */
ngx_string(ngx_http_error_495_page), /* 495, https certificate error */
ngx_string(ngx_http_error_496_page), /* 496, https no certificate */
ngx_string(ngx_http_error_497_page), /* 497, http to https */
ngx_string(ngx_http_error_404_page), /* 498, canceled */
ngx_null_string, /* 499, client has closed connection */
ngx_string(ngx_http_error_500_page),
ngx_string(ngx_http_error_501_page),
ngx_string(ngx_http_error_502_page),
ngx_string(ngx_http_error_503_page),
ngx_string(ngx_http_error_504_page),
ngx_string(ngx_http_error_505_page),
ngx_null_string, /* 506 */
ngx_string(ngx_http_error_507_page)</code></pre>
499狀態碼的定義是 client has closed connection,也就是客戶端斷開了連線。
解決辦法
Syntax: proxy_ignore_client_abort on | off;
Default:
proxy_ignore_client_abort off;
Context: http, server, location
確定當客戶端在不等待響應的情況下關閉連線時,是否應關閉與代理伺服器的連線。
Syntax: fastcgi_ignore_client_abort on | off;
Default:
fastcgi_ignore_client_abort off;
Context: http, server, location
確定當客戶端在不等待響應的情況下關閉連線時,是否應關閉與FastCGI伺服器的連線。