llcong 发表于 2017-12-23 11:31:52

nginx假死导致的问题回顾

  背景:
  网络大致拓扑型

  定位到一台Nginx节点于凌晨Timewait异常,等到6K。
  进程异常,ngx_http_realtime_request模块错误
  错误日志:
  

2017/02/24 00:01:02 25911#0: worker process 24588 exited on signal 11  
2017/02/24 00:01:02 25911#0: shared memory zone "http_realtime_request_zone" was locked by 24588
  
2017/02/24 00:01:02 25911#0: worker process 24589 exited on signal 11
  
2017/02/24 00:01:02 25911#0: shared memory zone "http_realtime_request_zone" was locked by 24589
  

  解决过程:
  Nginx每天凌晨定时切割日志reload后,进程异常,但端口存活,致使F5仍旧分发请求,以及监控无法异常告警。
  1. 从github上查找项目https://github.com/magicbear/ngx_realtime_request_module
  发现最近更新是4年前,项目不活跃。
  2.网上有报过这个问题:http://code.taobao.org/pipermail/tengine-cn/2014-June/001406.html
  

>>>> 2014-06-30 12:17 GMT+08:00 赵海军 <zhaohaijun在cmcm.com>:  

>>>>> 那这个问题应该是ngx_http_realtime_request导致的,请问有什么解决办法吗?  

>>>>>>> 这个看起来像是模块实现时的问题。需要这个模块的开发者来帮助排查,可以尝试再他的github上提个issue。  

>> BTW,我粗略看了下他的模块,这个问题可能和ngx_http_realtime_request_init_zone()实现有关系。  

>> *这里*ngx_http_realtime_request_init_zone()实现上是不太完善的  

>>  

  3. 关闭ngx_http_realtime_request模块,重新reload
  4.增加timewait 监控
  5. 用elk监控nginx的流量,替换ngx_http_realtime_request功能
页: [1]
查看完整版本: nginx假死导致的问题回顾