fabiolb / fabio

Consul Load-Balancing made simple
https://fabiolb.net
MIT License
7.25k stars 619 forks source link

gRPC streams are closed : [DEBUG] grpc: cleaning up connection to host #770

Open cmvoicu opened 4 years ago

cmvoicu commented 4 years ago

Hi,

I'm trying to use fabio as a proxy for gRPC, but there seems to be an issue with the rpc calls that return a stream. In this scenario the stream is not closed by either client or server but by fabio after some data is received or some idle time:

2020/05/14 14:34:49 [DEBUG] grpc: cleaning up connection to ......

cmvoicu commented 4 years ago

This seems to happen only starting with version 1.15.12 (1.5.11 seem to work). The reason maybe because i don't see in the log file the route add even if in the UI are there:

ishworg commented 4 years ago

What you are seeing is from:

            if !hasTarget(target, table) {
                log.Println("[DEBUG] grpc: cleaning up connection to", target.URL.Host)
                cs.Close()
                delete(p.connections, target)
            }

afaik, it is normal to see the cleanups happening.

cmvoicu commented 4 years ago

Yes, i saw the code, but the gRPC stream it's still open when this happens...so i guess the connection doesn t have a target... it s strange that the same config works for an older version(streams are not closed by fabio)