apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.49k stars 2.52k forks source link

help request: Will modifying the initial configuration of lua-resty-events max_payload_len to 2M have any impact on the robustness of the apisix service? #11049

Open creaplus opened 7 months ago

creaplus commented 7 months ago

Description

I encountered the following error when configuring the apisix production environment: 2024/03/08 18:40:39 [error] 14173#14173: *1337 [lua] init.lua:521: post_event failure with discovery_consul_update_all_services, update all services error: failed to publish event: payload exceeds the limitation (65536), context: ngx.timer

After tracing the source code, I found that the default limit of lua-resty-events is 64K. I use consul as the service discovery. The all service list dump file is approximately 80K. /usr/local/apisix/apisix/events.lua local opts increase max_payload_len = 1024 1024 2 I want to know whether this modification has any impact on the stability of apisix service

Environment

shreemaan-abhishek commented 7 months ago

@bzp2010 any insights here?