openresty / lua-nginx-module

Embed the Power of Lua into NGINX HTTP servers
https://openresty.org/
11.34k stars 2.03k forks source link

[bug]attempt to index global 'sw_tracer ' (a nil value) #2258

Closed jxplus closed 1 year ago

jxplus commented 1 year ago

1) init_by_lua_block, a init alias a require [sw_tracer = require("sw.tracer")] 2) rewrite_by_lua, use the sw_tracer, then log error of title.

[error] 110733#0: *23 lua entry thread aborted: runtime error: rewrite_by_lua(xxx.com:8):2: attempt to index global 'sw_tracer' (a nil value)

version: nginx v1.22.0 lua-nginx-module, when v0.10.15 is ok, when v0.10.20 is error. want to no why, and how to fix it.

lynch1981 commented 1 year ago

it looks incredible. Can you give a minimal complete configuration to reproduce the issue?

zhuizhuhaomeng commented 1 year ago

did you configure the lua_code_cache off?

jxplus commented 1 year ago

I know the reason, thanks