openresty / lua-resty-upstream-healthcheck

Health Checker for Nginx Upstream Servers in Pure Lua
521 stars 134 forks source link

health checker does not support stream directive #39

Open vesafb opened 7 years ago

vesafb commented 7 years ago

The health checker can't be used in the stream directive.

The snippet of nginx.conf:

stream {
    lua_shared_dict healthcheck 1m;
    init_worker_by_lua_block {
        local hc = require "resty.upstream.healthcheck"

The error message is: _nginx: [emerg] "lua_shared_dict" directive is not allowed here in ./conf/nginx.conf:121_