会不会你监控脚本有KILL NGINX 的相关实现?
|
陈伟 Chen Wei
多媒体业务产品部
|
| 云计算及IT产品经营部
|
Cloud Computing &
IT Product Operation
|
1/F, Building No. 3, ZTE
Corporation, Yuhuatai District, ,
Nanjing, P.R.China, 210012
Mobile: +86-18913979100
Email: chen...@zte.com.cn
More Information: VAS
、Cloud |
|
发件人:
zhangh...@gmail.com
收件人:
openresty <openresty@googlegroups.com>,
日期:
2015/12/11
17:40
主题:
Re: [openresty]
ngx.var.VARIABLE variable为自定义header,variable不存在时engine
worker进程异常退出
发件人:
openresty@googlegroups.com
请确认使用官方的 nginx 核心或者 OpenResty
软件包可以复现此问题。如果可以,请提供一个最小化的完整示例以便我们在本地复现问题。多谢!
谢谢两位前辈的回答。
由于在本地测试都没问题,恰好是部署到生产环境出现问题,生产环境比较复杂,我本身本地也比较难模拟,而且无法到生产环境调试。
但是有一个现象,worker进程是每一分重启1次
系统刚好有一个监控脚本 通过Python 每一分钟
调用一次 “get_nginx_status_cmd="curl 127.0.0.1:8888/nginx_status
2>/dev/null"”
location /nginx_status {
stub_status on;
allow 127.0.0.1/32;
deny all;
}
所以可以确定是nginx_status 这个请求造成worker进程重启,其它业务请求可正常处理。
分析这个请求是127.0.0.1 而其它业务请求经过上层代理时添加了自定义header(存放client
ip),业务请求可以取到header变量,监控请求取不到。
不知道通过这样的描述,你是否能定位问题?
--
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.
--------------------------------------------------------
ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited. If you have received this mail in error, please delete it and notify us immediately.