# rpc error: code = Canceled desc = grpc: the client connection is closing

- **ID:** `go/grpc-canceled-context`
- **Domain:** go
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The client's gRPC connection was closed (e.g., via conn.Close()) while a request was in flight, causing the RPC to be canceled.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 1.x | active | — | — |

## Workarounds

1. **** (85% success)
   ```
   if conn == nil { conn, _ = grpc.Dial(address, grpc.WithInsecure()) }; resp, err := client.Call(ctx, ...)
   ```
2. **** (80% success)
   ```
   Implement a pool that returns a new connection if the old one is closed.
   ```

## Dead Ends

- **** — The connection is closed; subsequent requests will also fail. (95% fail)
- **** — The connection is already closed; you need a new connection. (90% fail)
