# HTTP/2 GOAWAY frame received: last stream ID 0, error code NO_ERROR

- **ID:** `communication/http2-goaway-frame-received`
- **Domain:** communication
- **Category:** protocol_error
- **Error Code:** `NO_ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 78%

## Root Cause

The HTTP/2 server sent a GOAWAY frame to gracefully shut down the connection, often due to server maintenance, load balancing, or reaching max concurrent streams.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| nginx 1.25.0 | active | — | — |
| Node.js 20.11.0 | active | — | — |
| Envoy 1.28.0 | active | — | — |

## Workarounds

1. **Implement client-side reconnection logic that opens a new HTTP/2 connection upon receiving GOAWAY: In Node.js with http2 module, listen for 'goaway' event and create a new session: `session.on('goaway', () => { session.close(); createNewSession(); })`.** (85% success)
   ```
   Implement client-side reconnection logic that opens a new HTTP/2 connection upon receiving GOAWAY: In Node.js with http2 module, listen for 'goaway' event and create a new session: `session.on('goaway', () => { session.close(); createNewSession(); })`.
   ```
2. **Set a grace period in the server's GOAWAY handling to allow in-flight requests to complete: In nginx, configure `http2_max_concurrent_streams 256;` and `keepalive_timeout 60s;` to reduce GOAWAY frequency.** (80% success)
   ```
   Set a grace period in the server's GOAWAY handling to allow in-flight requests to complete: In nginx, configure `http2_max_concurrent_streams 256;` and `keepalive_timeout 60s;` to reduce GOAWAY frequency.
   ```
3. **Use connection pooling with multiple HTTP/2 sessions to distribute load: In gRPC, configure `grpc.lb_policy_name` as 'round_robin' with multiple subchannels.** (75% success)
   ```
   Use connection pooling with multiple HTTP/2 sessions to distribute load: In gRPC, configure `grpc.lb_policy_name` as 'round_robin' with multiple subchannels.
   ```

## Dead Ends

- **Disable HTTP/2 entirely and fall back to HTTP/1.1** — Disabling HTTP/2 loses performance benefits and doesn't fix the server-side issue; GOAWAY may still occur with HTTP/1.1 connection resets. (60% fail)
- **Increase the client's max concurrent streams limit** — The GOAWAY is server-initiated; client-side stream limits don't prevent the server from sending it. (85% fail)
- **Ignore GOAWAY and continue sending requests on the same connection** — GOAWAY signals imminent connection closure; continuing to send will result in stream errors or data loss. (90% fail)
