You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The service is configured with a health check. When the upstream node changes and the concurrent request is bright, there will be a large number of 500 errors(lua entry thread aborted because function 'f' is nil)
Expected Behavior
The function 'f' should not be nil, the request should be completed normally
Error Logs
The error log is found as follows:
2022/08/08 10:29:46 [error] 46#46: *144287093 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/core/config_util.lua:71: attempt to call local 'f' (a nil value)
stack traceback:
coroutine 0:
/usr/local/apisix/apisix/core/config_util.lua: in function 'cancel_clean_handler'
/usr/local/apisix/apisix/upstream.lua:119: in function 'fetch_healthchecker'
/usr/local/apisix/apisix/upstream.lua:327: in function 'set_upstream'
/usr/local/apisix/apisix/init.lua:515: in function 'http_access_phase'
access_by_lua(nginx.conf:253):2: in main chunk, client: 172.31.xx.xx, server: _, request: "GET xxxxxxx
According to the error message, find the location of the error code:
file path: apisix/core/config_util.lua
function _M.cancel_clean_handler(item, idx, fire)
local f = item.clean_handlers[idx]
core_tab.remove(item.clean_handlers, idx)
if fire then
f(item)
end
end
Steps to Reproduce
Install apisix to EKS using the helm package
Service discovery using kubernetes
Routed services enable health checks
Initiate concurrent requests, no such error message appears
Adjust (increase or decrease) upstream nodes, and then initiate concurrent requests, a large number of such error logs appear, and the requester receives a large number of 500 errors
Environment
APISIX version (run apisix version):2.14.1
Operating system (run uname -a): Linux apisix-58d87884d-l4qkw 5.4.129-63.229.amzn2.x86_64 change: added doc of how to load plugin. #1 SMP Tue Jul 20 21:22:08 UTC 2021 x86_64 Linux
OpenResty / Nginx version (run openresty -V or nginx -V): nginx version: openresty/1.19.9.1
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):3.4.0
APISIX Dashboard version, if relevant:2.13.0
LuaRocks version, for installation issues (run luarocks --version): 3.8.0
Current Behavior
The service is configured with a health check. When the upstream node changes and the concurrent request is bright, there will be a large number of 500 errors(lua entry thread aborted because function 'f' is nil)
Expected Behavior
The function 'f' should not be nil, the request should be completed normally
Error Logs
The error log is found as follows:
2022/08/08 10:29:46 [error] 46#46: *144287093 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/core/config_util.lua:71: attempt to call local 'f' (a nil value)
stack traceback:
coroutine 0:
/usr/local/apisix/apisix/core/config_util.lua: in function 'cancel_clean_handler'
/usr/local/apisix/apisix/upstream.lua:119: in function 'fetch_healthchecker'
/usr/local/apisix/apisix/upstream.lua:327: in function 'set_upstream'
/usr/local/apisix/apisix/init.lua:515: in function 'http_access_phase'
access_by_lua(nginx.conf:253):2: in main chunk, client: 172.31.xx.xx, server: _, request: "GET xxxxxxx
According to the error message, find the location of the error code:
file path: apisix/core/config_util.lua
function _M.cancel_clean_handler(item, idx, fire)
local f = item.clean_handlers[idx]
core_tab.remove(item.clean_handlers, idx)
if fire then
f(item)
end
end
Steps to Reproduce
Environment
apisix version):2.14.1uname -a): Linux apisix-58d87884d-l4qkw 5.4.129-63.229.amzn2.x86_64 change: added doc of how to load plugin. #1 SMP Tue Jul 20 21:22:08 UTC 2021 x86_64 Linuxopenresty -Vornginx -V): nginx version: openresty/1.19.9.1curl http://127.0.0.1:9090/v1/server_info):3.4.0luarocks --version): 3.8.0