~/talk

Long running PHP processes

Talkat Dutch PHP Conference 2017 · 2017-06-29..07-01· [php]
slides:none on file

Long-running PHP CLI workers consume queues for hours and need supervision, graceful shutdown and restart-on-bounds rather than ad hoc screen processes. Use supervisord or systemd, catch SIGTERM with pcntl signal dispatch, poll with a 20s timeout so restarts finish between iterations, and restart when memory_get_usage(true) exceeds limits (typical per-worker 64–128 MB). Monitor with ps and New Relic, scale by running many short-lived PHP processes rather than making one monolith.

AI-written summary · about

  1. 0:00Introduction
  2. 3:03Examples
  3. 4:19Essential characteristic
  4. 5:08Limitations
  5. 6:35PHP Developer
  6. 8:17PHP Process Structure
  7. 11:01Supervision
  8. 14:39Stop
  9. 18:30Memory
  10. 21:01Global State
  11. 23:20bottlenecks
  12. 28:26tools
  13. 33:37conclusions
~/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.