In recent months, FrankenPHP has been on everyone’s lips in the PHP world. There are articles, benchmarks, conference talks, and social media posts painting it as the next big evolutionary leap for modern applications, especially if you use Symfony (which is where I’ve been testing it) or Laravel.
The numbers you see are often very tempting: lower latency, much higher throughput, and even an embedded HTTP server that simplifies the stack. It sounds incredible… and to a great extent, it is.
Yet amid all the excitement about shaving off milliseconds, there’s something that often gets overlooked: the real infrastructure and context in which you run your application. This article isn’t an attack on FrankenPHP. On the contrary, I think it’s a great tool. What I want to do is invite you to take a critical look and carefully assess everything it entails before pushing it to production.
Why We All Want Better Performance (And That’s Normal)
When an application starts to grow, problems appear quickly: response times slow down, scaling gets expensive, and the server groans. In PHP, one of the classic culprits is the framework’s bootstrap process on every single request: dependency injection container, configuration loading, autoloading… everything resets from scratch over and over again.
FrankenPHP in worker mode tackles that exact pain point: it keeps the application loaded in memory between requests. The idea is brilliant, and under the right conditions, the performance leap is real. The catch is that many people assume this boost comes for “free” and fits every project equally well. That’s where the problems begin.
PHP-FPM: Simple, Predictable, and Still Very Much Alive
PHP-FPM has been the standard for years for a very specific reason: every request starts in a clean environment and, once finished, releases almost everything it consumed. This makes it safe and predictable, especially on modest infrastructure or under fluctuating traffic patterns (rush-hour spikes, quiet nights, etc.).
On a small VPS or server, you can host multiple projects without drama. Processes go idle when there’s no traffic and consume very little RAM. FrankenPHP worker, on the other hand, reserves memory from minute one to keep the entire framework warm. It’s like a roommate who takes up massive space right from day one and isn’t very good at sharing.
Worker Mode: High Power… and New Trade-offs
Switching to worker mode means breaking a core tenet of traditional PHP: the ephemeral request lifecycle. Now we’re dealing with long-running processes handling multiple requests in sequence.
This yields dramatic performance improvements, but it also introduces new responsibilities that aren’t optional:
- Top-tier code hygiene: In PHP-FPM, a small memory leak or a mishandled static variable usually goes unnoticed (the process dies quickly). In FrankenPHP worker mode, that turns into a countdown toward the OOM killer. If your code leaves garbage in memory, sooner or later the worker will eat up all available RAM.
- Managing persistent state: In FPM, the “share-nothing” memory wipe is a feature. In worker mode, if you leave a service in a dirty state in Symfony (an EntityManager with pending changes, an unclosed connection, an unreset static property…), that state persists and pollutes subsequent requests.
Making this shift isn’t just about “flipping a switch.” It requires discipline, thorough code reviews, worker-specific tests, and, in many cases, adjustments to libraries or design patterns you took for granted.
Infrastructure: The Big Topic Almost No One Mentions
Most benchmarks and comparisons obsess over requests per second. Very few talk about:
- How much RAM each warm worker actually consumes (and yes, it’s typically far more than an idle FPM process).
- How many concurrent workers you can realistically run on your machine or container before hitting a ceiling.
- What happens when you run on nodes with hard memory limits (Cloud Run, Fly.io, budget VPSs, etc.).
I’ve seen cases where adopting FrankenPHP worker mode improves theoretical performance… only to end up needing more instances, more RAM, or frequent restarts to avoid crashes. The result: a stack that looks faster on paper, but ends up being pricier or more unstable in production.
Sometimes simplifying infrastructure (a single binary, bidding farewell to Nginx + FPM) complicates day-to-day operations: you have to spend more time thinking about graceful reloads, scheduled worker restarts, and handling persistent state safely.
The question I always ask myself is: Where do I prefer my complexity: in the web server configuration or in the lifecycle logic of my services?
A More Realistic (and Honest) Take
Not every project needs to squeeze out every last millisecond. Many are standard CRUDs, admin panels, internal APIs, or moderate-traffic websites where stability, predictable costs, and things “just working” matter most.
If I had to sum up my current perspective in a single sentence, it would be this:
PHP-FPM remains the safe, conservative choice for resource-constrained infrastructure or variable traffic, while FrankenPHP in worker mode is a remarkably powerful tool… but selective and demanding.
FrankenPHP shines when:
- Traffic is relatively steady (without prolonged idle periods).
- Framework bootstrap overhead is a real, measurable bottleneck.
- The team has the operational maturity to handle long-running processes, investigate leaks, and test in environments simulating worker mode.
It’s Not About Choosing the Fastest Option, but the Best Fit
I love FrankenPHP, and I use it on a project where the conditions are right. But right now, it isn’t a one-size-fits-all solution—especially when resources are tight or the team isn’t prepared for the mindset shift.
Before taking the leap, it’s worth asking yourself a few uncomfortable questions:
- Is my codebase truly prepared to run “forever” without an automatic cleanup?
- Does my server (or container) have enough RAM and headroom to keep multiple warm workers alive without choking?
- Am I willing to invest time into specific testing, memory monitoring, and fine-tuning?
Because at the end of the day, premature optimization remains one of the greatest sources of headaches—especially when its infrastructure footprint is completely ignored.
What do you think? Are you already running it in production? What kinds of projects have worked best for you? I’d love to hear about your experience in the comments.