最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Nginx日志错误码499的问题解决方法
时间:2022-06-30 18:36:58 编辑:袖梨 来源:一聚教程网
nginx访问日志:
218.18.*.* - - [10/Sep/2014:13:27:50 +0800] "POST /index.php?date=2014-09-09&module=Live&action=getLastVisitsStart&segment=&idSite=2&period=day HTTP/1.1" 499 0 "http://count.111com.net/index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"
218.18.*.* - - [10/Sep/2014:13:27:50 +0800] "POST /index.php?date=2014-09-09&module=Annotations&action=getEvolutionIcons&idSite=2&period=day&lastN=30 HTTP/1.1" 499 0 "http://count.111com.net/index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"
218.18.*.* - - [10/Sep/2014:13:27:50 +0800] "POST /index.php?date=2014-09-09&module=Dashboard&action=getAllDashboards&idSite=2&period=day HTTP/1.1" 499 0 "http://count.111com.net/index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"
218.18.*.* - - [10/Sep/2014:13:27:50 +0800] "POST /index.php?date=2014-09-09&module=ExampleRssWidget&action=rssPiwik&widget=1&idSite=2&period=day HTTP/1.1" 499 0 "http://count.111com.net/index.php?module=CoreHome&action=index&idSite=2&period=day&date=yesterday" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0"
nginx定义错误码:
[root@hz logs]# cd /byrd/tools/nginx-1.7.1
[root@hz nginx-1.7.1]# grep 499 . -r
./CHANGES: *) Bugfix: zero status code was logged instead of 499 status code; the
./CHANGES: with 499 status code.
./CHANGES: *) Change: now the 499 error could not be redirected using an
./CHANGES.ru: *) Исправление: вместо кода ответа 499 в лог записывался код 0; ошибка
./CHANGES.ru: завершался с кодом 499.
./CHANGES.ru: *) Изменение: ошибку 499 теперь нельзя перенаправить с помощью директивы
./src/http/ngx_http_core_module.c: if (err->status == NGX_ERROR || err->status == 499) {
./src/http/ngx_http_request.h:#define NGX_HTTP_CLIENT_CLOSED_REQUEST 499
./src/http/ngx_http_special_response.c: ngx_null_string, /* 499, client has closed connection */
Binary file ./objs/nginx matches
[root@hz nginx-1.7.1]# grep NGX_HTTP_CLIENT_CLOSED_REQUEST . -r
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: NGX_HTTP_CLIENT_CLOSED_REQUEST);
./src/http/ngx_http_upstream.c: || rc == NGX_HTTP_CLIENT_CLOSED_REQUEST)
./src/http/ngx_http_request.h:#define NGX_HTTP_CLIENT_CLOSED_REQUEST 499
./src/http/ngx_http_request.c: || rc == NGX_HTTP_CLIENT_CLOSED_REQUEST
./src/http/ngx_http_request.c: ngx_http_finalize_request(r, NGX_HTTP_CLIENT_CLOSED_REQUEST);
原因①:
if (!u->cacheable) {
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
}
原因②:
if (!u->cacheable && u->peer.connection) {
ngx_log_error(NGX_LOG_INFO, ev->log, ev->kq_errno,
"kevent() reported that client prematurely closed "
"connection, so upstream connection is closed too");
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
return;
}
if (!u->cacheable && u->peer.connection) {
ngx_log_error(NGX_LOG_INFO, ev->log, err,
"epoll_wait() reported that client prematurely closed "
"connection, so upstream connection is closed too");
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
return;
}
if (!u->cacheable && u->peer.connection) {
ngx_log_error(NGX_LOG_INFO, ev->log, err,
"client prematurely closed connection, "
"so upstream connection is closed too");
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
return;
}
原因③:
ngx_log_error(NGX_LOG_INFO, ev->log, ev->kq_errno,
"kevent() reported that client prematurely closed "
"connection");
if (u->peer.connection == NULL) {
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
}
ngx_log_error(NGX_LOG_INFO, ev->log, err,
"epoll_wait() reported that client prematurely closed "
"connection");
if (u->peer.connection == NULL) {
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
}
ngx_log_error(NGX_LOG_INFO, ev->log, err,
"client prematurely closed connection");
if (u->peer.connection == NULL) {
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
}
原因④:
if (r->connection->error) {
ngx_http_upstream_finalize_request(r, u,
NGX_HTTP_CLIENT_CLOSED_REQUEST);
return;
}
解决方法:
①:未成功[解决方法
proxy_ignore_client_abort on; #如果客户端断开请求,也保持后端的下载
相关文章
- 《绝区零》伊芙琳培养材料汇总 01-24
- 《无限暖暖》1.2春节兑换码一览 01-24
- 《网上国网》查询阶梯档位方法 01-24
- 《蛋仔派对》神游贺岁盲盒获取方法 01-24
- 《炉石传说》星际联动盗贼卡组玩法介绍 01-24
- 皮革珊瑚属于珊瑚中的 01-24