What problem does it solve?
Building Swoole applications often fails in subtle ways—leaking state across requests, blocking inside coroutines, misusing runtime hooks, or mishandling graceful reloads—leading to hard-to-debug production incidents.
Core Features & Use Cases
- Long-running process correctness: Clarifies object lifetimes and what must not rely on php-fpm behaviors (superglobals, session_start, echo/exit/header, static state).
- Coroutine safety patterns: Covers coroutine container rules, cooperative scheduling behavior, cancellation/time limits, and safe cleanup with defer.
- Production-grade Swoole reference: Provides detailed guidance for servers (HTTP/WebSocket/TCP), events and settings, concurrency primitives (Channel/WaitGroup/Barrier), runtime hook flags (including SWOOLE_HOOK_ALL), pooling rules, and the most common pitfalls with tuning and debugging.
Quick Start
Use the swoole-expert skill to review your Swoole server code for coroutine safety, correct hook configuration, and graceful reload behavior.