~/talk

Crashing BEAM applications

Talkat ElixirConf EU Virtual 2020 · 2020-10-07..10-08· [concurrency]
slides:none on file

Shows concrete pitfalls and fixes: converting untrusted strings with String.to_atom can exhaust the atom table and crash the VM; using links instead of monitors leaves orphaned processes; Cowboy keep‑alive plus per‑request Agents creates leaks under reuse, and a native DNS resolver pool of 4 causes queues that balloon to 100k processes during load; large binaries (>64 bytes) go to the shared heap and a long‑running message router for ~2,000 devices triggers OOM via retained refs. Uses observer_cli, Phoenix LiveDashboard, recon and Telemetry/Prometheus for diagnosis; fixes include monitors, temporary restarts, explicit DNS config, hibernation or forced full GC.

AI-written summary · about

  1. 0:00Intro
  2. 0:12Crashing BEAM applications
  3. 3:18Things we often hear
  4. 3:33Actor Model!
  5. 3:48Super scalable!
  6. 3:59Well.. That's not the full picture
  7. 4:58How to crash your BEAM application
  8. 7:28Module names Node names • Struct fields "decode as atom"
  9. 12:38For each request - Start a new Agent - Monitor the agent and the process - kill agent when process ends normally OR in case of exception: take breadcrumbs from agent, report, and kill
  10. 26:43configures how often a fullsweep GC will happen, and that will collect ProcBins 2 hibernating process when it hibernates, a fullsweep GC will run 3 moving work to short-lived processes it possible
  11. 28:58What to do when it happens
  12. 29:12Make it operable!
  13. 30:54Operate!
  14. 33:32Metrics and Visibility!
  15. 33:49telemetry
  16. 34:45Bottomline?
  17. 35:09There are several ways to break your systems
  18. 35:37Don't go to production without visibility
~/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.