# RuntimeWarning: coroutine 'sleep' was never awaited / requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

- **ID:** `python/fastapi-async-blocking-event-loop`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Blocking synchronous calls (requests, time.sleep, heavy IO) inside an async def endpoint block the event loop, causing timeouts and dropped connections.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   import httpx
async with httpx.AsyncClient() as client:
    r = await client.get(url)
   ```
2. **** (90% success)
   ```
   from starlette.concurrency import run_in_threadpool
result = await run_in_threadpool(blocking_fn, arg)
   ```

## Dead Ends

- **** — Does not unblock the event loop; requests still queue. (80% fail)
- **** — Each worker still has one blocked loop; capacity is limited. (70% fail)
