Users that are on MySQL or MariaDB databases from before this feature was implemented may upgrade to PHP 8.6, but would not be able to use persistent connections. This means that their software could continue to work, but they might lose a performance optimization.
Please clarify this.
Users on older mysql will hit connection error immediately after
upgrading to 8.6. So saying "their software could continue to work" is
misleading. Their PHP code must be modified before upgrading - turning
PDO::ATTR_PERSISTENT to false or removing it entirely. And only after
that it would continue to work.
On Thu, Jul 2, 2026 at 11:42 AM <go.al.ni@gmail.com> wrote:
> Users that are on MySQL or MariaDB databases from before this feature was implemented may upgrade to PHP 8.6, but would not be able to use persistent connections. This means that their software could continue to work, but they might lose a performance optimization.
Please clarify this.
Users on older mysql will hit connection error immediately after
upgrading to 8.6. So saying "their software could continue to work" is
misleading. Their PHP code must be modified before upgrading - turning
PDO::ATTR_PERSISTENT to false or removing it entirely. And only after
that it would continue to work.
Is this true? Having looked at the persistent connection code, I
believe it would silently handle the error by simply discarding the
connection and creating a new one. Thus, "their software could
continue to work, but they might lose a performance optimization."
On the first execution script echoes 1. On the second - 2. Each
execution increments the counter by one. When I restart the php-fpm
process, the counter restarts again from 1. There is connection leak
here!
When I removed `PDO::ATTR_PERSISTENT`, the counter stop increasing.
When I switched to mysql 8, counter was always 1 (both with and
without persistent connections).
On the first execution script echoes 1. On the second - 2. Each
execution increments the counter by one. When I restart the php-fpm
process, the counter restarts again from 1. There is connection leak
here!
When I removed `PDO::ATTR_PERSISTENT`, the counter stop increasing.
When I switched to mysql 8, counter was always 1 (both with and
without persistent connections).
Thank you for identifying a connection leak; I have identified the
cause and I'm considering how to address it. That said, I don't
believe this is inherent to the RFC, instead I would consider this a
bug in my implementation.