azabrha commented on issue #12654: URL: https://github.com/apache/apisix/issues/12654#issuecomment-3392975953
> Hey guys, there’s **no need to modify the lua.init** code. You just need to add a few parameters to the **APISIX configuration** and the **ETCD container variables** to bypass this limitation in a proper, clean way. > > **in APISIX config (config.yaml):** on apisix part: > > ``` > apisix: > . > . > . > > nginx_config: > http: > client_max_body_size: 10m > client_body_buffer_size: 10m > ``` > > on etcd part : > > ``` > etcd: > host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster. > - "http://etcd:2379" # multiple etcd address > prefix: "/apisix" # apisix configurations prefix > timeout: 30 # 30 seconds > grpc: > max_send_msg_size: 10485760 # 10MB (default is 2MB) > max_recv_msg_size: 10485760 # 10MB (default is 2MB) > ``` > > **on ETCD container(e.g : docker-compose.yml):** > > ``` > > etcd: > image: bitnami/etcd:xxx > container_name: etcd > restart: always > volumes: > -.... > -..... > environment: > ... > ... > ... > ... > ETCD_MAX_REQUEST_BYTES: "10485760" > ``` > > …and then bring the containers down and up again (not just restart them): > > ``` > docker compose down && sleep 5 && docker compose up -d > ``` > > …the limitation will be increased. ### Wow, I can’t believe it, it worked like a charm! I was able to sync a 5 MB file perfectly, smoothly, and without any issues. ```yaml ~# du -sh test_bigfile.yaml 4.8M test_bigfile.yaml ~# adc sync -f test_bigfile.yaml [6:13:59 AM] [ADC] › ▶ start Load local configuration [6:14:00 AM] [ADC] › ▶ start Load /root/test_bigfile.yaml [6:14:00 AM] [ADC] › ✔ success Load /root/test_bigfile.yaml [6:14:00 AM] [ADC] › ▶ start Merge local configurations [6:14:00 AM] [ADC] › ✔ success Merge local configurations [6:14:00 AM] [ADC] › ▶ start Resolve value variables [6:14:00 AM] [ADC] › ✔ success Resolve value variables [6:14:00 AM] [ADC] › ✔ success Load local configuration [6:14:00 AM] [ADC] › ▶ start Lint configuration [6:14:00 AM] [ADC] › ✔ success Lint configuration [6:14:00 AM] [ADC] › ▶ start Load remote configuration [6:14:00 AM] [ADC] › ▶ start Fetch all configuration [6:14:00 AM] [APISIX] › ▶ start Fetch stream_routes [6:14:00 AM] [APISIX] › ✔ success Fetch stream_routes [6:14:00 AM] [APISIX] › ▶ start Fetch consumers [6:14:00 AM] [APISIX] › ✔ success Fetch consumers [6:14:00 AM] [APISIX] › ▶ start Fetch upstreams [6:14:00 AM] [APISIX] › ✔ success Fetch upstreams [6:14:00 AM] [APISIX] › ▶ start Fetch plugin_metadata [6:14:00 AM] [APISIX] › ✔ success Fetch plugin_metadata [6:14:00 AM] [APISIX] › ▶ start Fetch global_rules [6:14:00 AM] [APISIX] › ✔ success Fetch global_rules [6:14:00 AM] [APISIX] › ▶ start Fetch plugin_configs [6:14:00 AM] [APISIX] › ✔ success Fetch plugin_configs [6:14:00 AM] [APISIX] › ▶ start Fetch routes [6:14:00 AM] [APISIX] › ✔ success Fetch routes [6:14:00 AM] [APISIX] › ▶ start Fetch ssls [6:14:00 AM] [APISIX] › ✔ success Fetch ssls [6:14:00 AM] [APISIX] › ▶ start Fetch services [6:14:00 AM] [APISIX] › ✔ success Fetch services [6:14:00 AM] [ADC] › ✔ success Fetch all configuration [6:14:00 AM] [ADC] › ✔ success Load remote configuration [6:14:00 AM] [ADC] › ▶ start Diff configuration [6:14:00 AM] [ADC] › ✔ success Diff configuration [6:14:00 AM] [ADC] › ▶ start Sync configuration [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path1 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path1 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path2 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path2 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/sub/path3 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/sub/path3 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path4 - post" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path4 - post" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/sub2/path5 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/sub2/path5 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path6 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path6 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path7 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path7 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path8 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path8 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path9 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path9 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path10 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path10 - get" [6:14:01 AM] [APISIX] › ▶ start Update route: "01725 - /api/path11 - get" [6:14:01 AM] [APISIX] › ✔ success Update route: "01725 - /api/path11 - get" [6:14:02 AM] [APISIX] › ▶ start Update service: "01725 - test V2 API Documentation - 1.0.0" [6:14:02 AM] [APISIX] › ✔ success Update service: "01725 - test V2 API Documentation - 1.0.0" [6:14:02 AM] [ADC] › ✔ success Sync configuration [6:14:02 AM] [ADC] › ★ star All is well, see you next time! ``` ### thanks a lot, you’re awesome! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
