﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1590	grpc nginx connection issue (draining and no connection available)	stephanus.tedy@…		"grpc client
golang, grpc-go/1.10.0

Hi, I am implementing grpc and nginx as load balancer.
setup is :
- use service discovery, it will resolve to multiple server
- each server will have dedicated nginx and do grpc_pass to localhost

on normal traffic, everything works fine.
but on high traffic, start getting error on the client.

it produce 2 types of error :
- there is no connection available
- the connection is draining

but there is no error on access and error log.
these error gone when I disable nginx and connect directly to servers.

what is actually happens and how to fix this ?

Thanks!

config :
server {
    server_name ..;
    listen 57046 http2;
    default_type application/grpc;

    access_log /var/log/nginx/grpc.access.log logformat;
    error_log  /var/log/nginx/grpc.error.log;

    location / {
        grpc_pass grpc://127.0.0.1:57045;
        error_page 502 500 504 = /grpc_error_page;
    }

    location = /grpc_error_page {
        internal;

        add_header grpc-status 14;
        add_header grpc-message ""upstream service failure"";

        return 204;
    }
}

"	defect	closed	blocker		nginx-module	1.14.x	invalid	grpc connection failure, the connection is draining ,  no connection available		Linux 4.4.0-93-generic #116~14.04.1-Ubuntu SMP Mon Aug 14 16:07:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux	nginx version: nginx/1.14.0
