Replies: 6 comments 7 replies
-
Hi @tzssangglass, could you please give some hints on this issue? 😄 |
Beta Was this translation helpful? Give feedback.
-
consul_kv: By setting this, you can pull the configuration from consuk kv regularly, it will not be 502, but according to the document, the official does not recommend setting this, I don’t know if there is any other solution |
Beta Was this translation helpful? Give feedback.
-
I can't think of any good options.
I think it's normal that restart means the upstream service is temporarily unavailable. |
Beta Was this translation helpful? Give feedback.
-
The fetch_interval controls the frequency of the pull data from consul. But there will always be a cache, and if the service restarts during the cache time, it will still return 502. |
Beta Was this translation helpful? Give feedback.
-
apisix first get There is a solution, set keepalive and fetch_interval timing pull, but the official does not recommend this, I don’t know if there is any other solution |
Beta Was this translation helpful? Give feedback.
-
When Could you add more log (or decrease the log level) in apisix/apisix/discovery/consul_kv/init.lua Line 240 in 50af9bc |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Apisix uses consul service discovery. Services are dynamic ports. Every time a service is built, it will basically be 502, unless apisix is restarted.
Reasons for guessing:
After the microservice is restarted, the port in the consul kv configuration is changed, and apisix saves the kv configuration that was pulled last time, so the result is always 502
After restarting the apisix service, it is normal. After restarting apisix, the configuration is pulled from consul kv again
Is there any way to solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions