fabio icon indicating copy to clipboard operation
fabio copied to clipboard

Fabio on gRPC mode closes open streams on route update even if the same route is added.

Open cmvoicu opened this issue 3 years ago • 3 comments

Hi,

It seems that fabio closes open gRPC stream when a route update happens. Also unfortunatelly not sure why i can't set the level to debug:

2020/12/22 00:02:01 [INFO] Cannot set log level to DEBUG

2020/12/22 00:02:01 [INFO] Version 1.5.11 starting 2020/12/22 00:02:01 [INFO] Go runtime is go1.11.5 2020/12/22 00:02:01 [INFO] Metrics disabled 2020/12/22 00:02:01 [INFO] Setting GOGC=800 2020/12/22 00:02:01 [INFO] Setting GOMAXPROCS=32


2020/12/22 02:40:51 [WARN] consul: Error getting catalog service rtp-prd-position-service. Unexpected response code: 500 (rpc error making call: rpc error making call: node is not the leader) 2020/12/22 02:40:51 [INFO] Config updates -route add rtp-prd-position-service /business.RTPoseService grpcs://climatologue.fr.world:7772 opts "tlsskipverify=true" -route add rtp-prd-position-service /business.RTPoseService grpcs://cardiologue.fr.world:7771 opts "tlsskipverify=true" 2020/12/22 02:40:54 [INFO] Config updates +route add rtp-prd-position-service /business.RTPoseService grpcs://climatologue.fr.world:7772 opts "tlsskipverify=true" +route add rtp-prd-position-service /business.RTPoseService grpcs://cardiologue.fr.world:7771 opts "tlsskipverify=true"

Any idea why this happens...it can happen like 2-3 times per day. Maybe because of the consul error retrieving catalog service? Here is the file config used: proxy.cs = cs=machine;type=file;.... proxy.addr = :8888;proto=grpcs;cs=machine ui.addr = xxx.xx.xx.xx ui.access =rw ui.title = rtpose-fr-prd log.level = DEBUG log.access.target = stdout log.access.level = DEBUG registry.consul.register.enabled = true registry.consul.register.name = rtp-prd-fabio registry.consul.register.addr = :9999 registry.consul.token = registry.consul.pollinterval =15s registry.consul.tls.insecureskipverify =true proxy.maxconn = 20000

Thank you!

cmvoicu avatar Dec 22 '20 13:12 cmvoicu

yes , it will close open grpc stream connect when update route, because when a route update it will create a new Table but function hasTarget compared by table pointer. I solved in #807

qqwx1986 avatar Dec 23 '20 03:12 qqwx1986

hi, thanks for your answer...i see the fix is in PR, not yet merged...is there a workarround for this with configs, as it seems the issue for not getting the catalog service is transiet(it works later on)....so should i decrease the config updates/pollInterval from consul or increase the 5s grpcConnectionPool cleanup, some number of retries or something?

cmvoicu avatar Dec 23 '20 10:12 cmvoicu

hi, thanks for your answer...i see the fix is in PR, not yet merged...is there a workarround for this with configs, as it seems the issue for not getting the catalog service is transiet(it works later on)....so should i decrease the config updates/pollInterval from consul or increase the 5s grpcConnectionPool cleanup, some number of retries or something?

i'm sorry i think there is no config can solve this issue

qqwx1986 avatar Dec 23 '20 12:12 qqwx1986