Stop Running PHP on tokio's spawn_blocking - Own Your Thread Pool
Why ePHPm moved PHP execution off tokio's generic blocking pool onto threads it owns. How the switch rolled out behind a knob and what it did to memory, throughput and overload.
For most of its life, ePHPm ran every PHP request on tokio’s spawn_blocking
pool. It works. It passes tests and it serves benchmarks fine. It’s the first thing anybody reaches for when they need
to call blocking code from async Rust. It’s also quietly wrong for a language runtime. The problems only show up under
overload or after a crash. Over the last three weeks it got replaced with a pool of OS threads that ePHPm owns. That
pool shipped first behind a config flag, then as…
