~/talk

Unblocking the Loop: Mastering Python's I/O Loop Monitoring

Talkat PyCon Israel 2024 · on Monday, 2024-09-16· [observability, python]
github:gnir-work
slides:none on file

Production asyncio services suffer repeated pod restarts after the event loop blocks for seconds at a time, once showing a 7s ping and daily restarts, traced to forgotten awaits and CPU heavy sync work inside async handlers. The investigation uses httpx async clients, async DB calls, Kubernetes and AWS, and yields a small Python package that installs via set_event_loop_policy and reports per coroutine name duration count and loop lag. The open source loop monitor proves it catches blockers and stops the invisible latency cascade.

AI-written summary · about

  1. 0:00Introduction and speaker intro
  2. 1:34Understanding Python's event loop
  3. 4:03How asyncio works in practice
  4. 8:43Challenges with asyncio loops
  5. 9:50Real-world production issues
  6. 12:39Debugging blocked event loops
  7. 15:10Searching for solutions
  8. 16:14Designing the monitoring tool
  9. 17:42Introducing the loop monitor
  10. 18:46Demo and results
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.