Skip to content

nginx worker signal 11 问题 #12

@imjustfly

Description

@imjustfly

按照如下配置时,配置问题test通过,运行起来的时候,worker不停的退出,信号11,是经典的segmentation fault,应该是内存引用的问题,确定consul地址是正确的:

upstream consul {
    # fake server otherwise ngx_http_upstream will report error when startup
    server 127.0.0.1:11111;

    # all backend server will pull from consul when startup and will delete fake server

    upsync 127.0.0.1:8500/v1/kv/upstreams/test upsync_timeout=6m upsync_interval=500ms upsync_type=consul strong_dependency=off;
    upsync_dump_path /data/server/nginx_consul/conf/upstreams/upstream_consul.conf;
}

server {
    listen 18080;

    location = / {
        proxy_pass http://consul;
    }

    location = /upstream_show {
        upstream_show;
    }
}

woker不停退出的日志如下:

2016/01/06 14:45:45 [alert] 22928#0: worker process 29593 exited on signal 11
2016/01/06 14:45:45 [alert] 22928#0: worker process 29594 exited on signal 11
2016/01/06 14:45:45 [alert] 22928#0: worker process 29595 exited on signal 11
2016/01/06 14:45:45 [alert] 22928#0: worker process 29596 exited on signal 11
2016/01/06 14:45:45 [alert] 22928#0: worker process 29597 exited on signal 11
2016/01/06 14:45:45 [alert] 22928#0: worker process 29599 exited on signal 11
2016/01/06 14:45:45 [alert] 22928#0: worker process 29600 exited on signal 11

每秒几十条,去掉upsync和upsync_dump_path配置项后 worker是可以稳定存活

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions