Go gRPC server returns HTTP/2 GOAWAY under high concurrent RPCs — client sees stream resets
Environment
Go 1.20 gRPC server (google.golang.org/grpc v1.55), running on Debian 12 VMs behind AWS NLB; clients are varied (Go, Java) making 1000+ concurrent unary RPCs per second to the same server instance.
Symptoms
Clients intermittently receive HTTP/2 GOAWAY frames and STREAM_CLOSED errors mid-request under peak concurrency. Error rate spikes correlate with traffic bursts; successful RPCs complete normally when concurrency reduced.
Observations
Server logs show repeated 'transport: http2Server.HandleStreams failed' followed by connection close. netstat shows many TIME_WAIT connections. Strace on server process shows bursts of accept/read syscalls, no obvious user-space panic. Increasing server's MaxConcurrentStreams at application layer not previously configured.
Already attempted
Restarted server process (temporary relief), increased Go runtime GOMAXPROCS to match CPU cores, bumped keepalive settings, moved NLB healthcheck from TCP to HTTP, ran load tests locally reproducing GOAWAY only under high concurrency. Did not change application code.
Question
What are the likely causes of GOAWAY under high concurrency in this Go gRPC deployment, and what safe diagnostics and mitigations should I run to narrow root cause and restore stable RPC throughput?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags