# sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not translate host name "db.example.com" to address: Temporary failure in name resolution

- **ID:** `python/sqlalchemy-connection-ssl-error`
- **Domain:** python
- **Category:** network_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

DNS resolution failure for database hostname.

## Version Compatibility

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

## Workarounds

1. **Check DNS configuration and network connectivity.** (90% success)
   ```
   nslookup db.example.com
ping db.example.com
   ```
2. **Use IP address temporarily and fix DNS.** (85% success)
   ```
   engine = create_engine('postgresql://user:pass@192.168.1.100/dbname')
   ```

## Dead Ends

- **Hardcoding IP address in connection string.** — IP may change; not portable. (60% fail)
- **Increasing connection timeout.** — DNS failure persists regardless of timeout. (80% fail)
