<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/tqnyvb0od" -->

---
title: PHP Doesn’t Have a Scaling Problem. Its runtime does.
description: PHP's scaling problems come from its runtime, not the language itself, the author argues. Every PHP-FPM worker opens its own MySQL connection, so 50 workers...
canonical: https://daily.dev/posts/tqnyvb0od
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: PHP Doesn’t Have a Scaling Problem. Its runtime does. | daily.dev
og:description: PHP's scaling problems come from its runtime, not the language itself, the author argues. Every PHP-FPM worker opens its own MySQL connection, so 50 workers...
og:url: https://daily.dev/posts/tqnyvb0od
og:image: https://api.daily.dev/og/posts/TqnYVB0Od.png
og:image:alt: Post cover image
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PHP Doesn’t Have a Scaling Problem. Its runtime does.

**[PHP Dev](https://daily.dev/sources/phpdev)** · [@damienseguy](https://daily.dev/damienseguy) · 24 upvotes · 6 comments

## Summary

PHP's scaling problems come from its runtime, not the language itself, the author argues. Every PHP-FPM worker opens its own MySQL connection, so 50 workers need 50 connections, and that multiplies across every server you add. The author built a small Go proxy that pools connections, speaking the MySQL wire protocol on both sides, so PHP connects to it like it's MySQL. In a test lab with MySQL capped at 20 connections and 50 PHP-FPM workers, going direct failed three out of four requests; through the proxy with a pool of just 10 connections, all requests succeeded and worst-case latency dropped from about a second to about 30ms. The author notes mature tools like ProxySQL, FrankenPHP, Swoole, and RoadRunner already solve this differently.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@daniel.mutuku404/php-doesnt-have-a-scaling-problem-its-runtime-does-20b735f4164f>

## Community discussion

Top comments from developers on daily.dev.

**@nop1984** · 4 upvotes

> Pgbouncer reinvented?
>
> Runtime can not have described issues, since it is just a moment of time in application development and lifecycle. And only issues it can have are in code it runs. For example division by zero is a runtime issue or accessing out of bounds memory.
>
> Execution environment is more accurate name for described problem.

**@nosfair** · 3 upvotes

> PHP doesn't need to become Go to scale.
>
> It needs developers who understand their database, runtime, concurrency model, and actual bottlenecks.
>
> Changing the language is often easier than admitting the architecture needs work.

**@lancelotoleriana** · 1 upvotes

> Great breakdown. The real trade-off when moving away from classic FPM to long-running runtimes is shifting from stateless simplicity to managing memory leaks and worker state yourself. Curious what runtime setup you've found hits the best balance in production?

**@soapbravo** · 0 upvotes

> PHP for PHP ready projects only. likely simple and small.
>
> Other stack for others.

## Similar posts on daily.dev

- [Your Laravel App Is Paying 20 Workers to Sleep](https://daily.dev/posts/your-laravel-app-is-paying-20-workers-to-sleep-wrk9sge8u) · Medium · 0 upvotes · 0 comments
- [Postgres Postmaster does not scale](https://daily.dev/posts/postgres-postmaster-does-not-scale-fee3cv3ni) · Hacker News · 45 upvotes · 1 comments
- [Once again processing 11 million rows, now in seconds](https://daily.dev/posts/once-again-processing-11-million-rows-now-in-seconds-oqf9cnfsn) · stitcher.io · 98 upvotes · 1 comments
- [Connection Pool Sizing, Measured: Why 48 Connections Beat 400](https://daily.dev/posts/connection-pool-sizing-measured-why-48-connections-beat-400-f0oqizynp) · The Infinity · 62 upvotes · 5 comments

---

Tags: [#database](https://daily.dev/tags/database), [#php](https://daily.dev/tags/php), [#golang](https://daily.dev/tags/golang), [#mysql](https://daily.dev/tags/mysql)

[View this post on daily.dev](https://daily.dev/posts/tqnyvb0od)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/tqnyvb0od","headline":"PHP Doesn’t Have a Scaling Problem. Its runtime does.","text":"Shared: PHP Doesn’t Have a Scaling Problem. Its runtime does.","url":"https://daily.dev/posts/tqnyvb0od","datePublished":"2026-11-16T14:57:31.474Z","dateModified":"2026-11-16T15:03:31.115Z","author":{"@type":"Person","name":"Damien seguy","url":"https://daily.dev/damienseguy","image":"https://media.daily.dev/image/upload/s--nPbjKqol--/f_auto,q_auto/v1698422671/avatars/avatar_G85JhYcDxAg024Omc8Rlp","description":"PHP developer passionate about deep language knowledge, testing, static analysis, and sustainable it","worksFor":{"@type":"Organization","name":"Exakat","logo":"https://media.daily.dev/image/upload/s--ibtl6fze--/f_auto/v1749051132/companies/exakat"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":43770}},"image":"https://media.daily.dev/image/upload/s--0_ODbtD2--/f_auto/v1722860399/public/Placeholder%2008","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":23},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":6}],"sharedContent":{"@type":"WebPage","url":"https://api.daily.dev/r/EtSQcjEgW"},"comment":[{"@type":"Comment","text":"Pgbouncer reinvented?\nRuntime can not have described issues, since it is just a moment of time in application development and lifecycle. And only issues it can have are in code it runs. For example division by zero is a runtime issue or accessing out of bounds memory.\nExecution environment is more accurate name for described problem.","datePublished":"2026-11-16T23:45:13.015Z","url":"https://daily.dev/posts/TqnYVB0Od#c-5W0FOqIqQ","author":{"@type":"Person","name":"Mykola Dolynskyi","url":"https://daily.dev/nop1984","image":"https://lh3.googleusercontent.com/a/ACg8ocK75Ige2Bk8FXIO0u2TbWYbc6SvwTaLzSgr6G7VQoWPWR2uwsf-Wg=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"PHP doesn’t need to become Go to scale.\nIt needs developers who understand their database, runtime, concurrency model, and actual bottlenecks.\nChanging the language is often easier than admitting the architecture needs work.","datePublished":"2026-11-17T10:16:38.811Z","url":"https://daily.dev/posts/TqnYVB0Od#c-vF1yk9HOS","author":{"@type":"Person","name":"Thialon","url":"https://daily.dev/nosfair","image":"https://avatars.githubusercontent.com/u/70216808?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Great breakdown. The real trade-off when moving away from classic FPM to long-running runtimes is shifting from stateless simplicity to managing memory leaks and worker state yourself. Curious what runtime setup you’ve found hits the best balance in production?","datePublished":"2026-11-17T08:59:51.250Z","url":"https://daily.dev/posts/TqnYVB0Od#c-0O5ZeUq94","author":{"@type":"Person","name":"Lancelot Oleriana","url":"https://daily.dev/lancelotoleriana","image":"https://lh3.googleusercontent.com/a/ACg8ocKhn5lbWMmGtRF0j5dhbmw-eampCyqNsj43YER0ShGZGRDbWRSPsQ=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"PHP for PHP ready projects only. likely simple and small.\nOther stack for others.","datePublished":"2026-11-17T15:14:02.879Z","url":"https://daily.dev/posts/TqnYVB0Od#c-lY9UtZFM2","author":{"@type":"Person","name":"Soap Bravo","url":"https://daily.dev/soapbravo","image":"https://media.daily.dev/image/upload/s--rkKDWshV--/f_auto/v1783071551/avatars/avatar_1D30kcJ92FZKAXwAPCvAl?_a=BAMAMicg0"}}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/squads/phpdev","name":"PHP Dev"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"PHP Dev","item":"https://daily.dev/squads/phpdev"},{"@type":"ListItem","position":3,"name":"PHP Doesn’t Have a Scaling Problem. Its runtime does."}]}
```

