# SchemaRegistryTimeoutException: timeout waiting for schema registration

- **ID:** `data/avro-schema-registry-timeout`
- **Domain:** data
- **Category:** network_error
- **Error Code:** `SchemaRegistryTimeoutException`
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

Kafka Schema Registry client timed out while waiting for the registry to acknowledge schema registration due to network congestion or registry overload.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| confluent-kafka 7.5.0 | active | — | — |
| avro 1.11.3 | active | — | — |
| kafka-avro-serializer 7.5.0 | active | — | — |

## Workarounds

1. **Check Schema Registry health: `curl -f http://schema-registry:8081/subjects` — if unreachable, restart the registry service or check network/firewall rules.** (80% success)
   ```
   Check Schema Registry health: `curl -f http://schema-registry:8081/subjects` — if unreachable, restart the registry service or check network/firewall rules.
   ```
2. **In producer config, set `schema.registry.request.timeout.ms=10000` and `schema.registry.max.retries=5` to allow transient failures to recover.** (70% success)
   ```
   In producer config, set `schema.registry.request.timeout.ms=10000` and `schema.registry.max.retries=5` to allow transient failures to recover.
   ```
3. **If using Confluent Schema Registry with Docker, ensure the registry container has enough resources: `docker update --memory=2g schema-registry` and check `docker logs schema-registry` for OOM errors.** (75% success)
   ```
   If using Confluent Schema Registry with Docker, ensure the registry container has enough resources: `docker update --memory=2g schema-registry` and check `docker logs schema-registry` for OOM errors.
   ```

## Dead Ends

- **Increase the schema registry request timeout to a very high value (e.g., 5 minutes)** — If the registry is down or network is completely broken, no timeout value will help; it just delays failure. (70% fail)
- **Restart the Kafka broker to 'refresh' the schema registry connection** — Schema registry is a separate service from Kafka brokers; restarting brokers doesn't affect registry connectivity. (90% fail)
- **Disable schema validation entirely in the producer config** — This bypasses the error but can lead to data corruption downstream if schemas are incompatible. (80% fail)
