Bug #81335 [Com]: PHP Warning, Packets out of order after connection timeout

From: Date: Thu, 06 Apr 2023 20:32:20 +0000
Subject: Bug #81335 [Com]: PHP Warning, Packets out of order after connection timeout
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244129@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81335&edit=1 ID: 81335 Comment by: adrien at poupa dot net Reported by: bohuslav at simek dot si Summary: PHP Warning, Packets out of order after connection timeout Status: Verified Type: Bug Package: PDO MySQL Operating System: Alpine Linux 3.14 PHP Version: 7.4.22 Block user comment: N Private report: N New Comment: We are seeing the same problem after migrating to MySQL 8.0.28. However in our case it makes sense: we are using persistent connections, and this is happening after the server closed the connection. My fix would have been to retry to connect when this happens; however even with mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); I am not able to catch this as the warning is always reported and the exception is 2006 - MySQL has gone away. It should trigger a catchable exception in my opinion. Previous Comments: ------------------------------------------------------------------------ [2023-02-08 12:01:53] jeka dot corvus at gmail dot com I have the same error docker image: php:8.2-fpm-alpine - php 8.2.2 docker image: percona-server:8.0 - mysql:8.0.30 Linux Kernel: 5.15.49 PHP Warning: Packets out of order. Expected 1 received 0. Packet size=145 ------------------------------------------------------------------------ [2022-11-08 22:42:52] johnnywalker at gmail dot com I can confirm script failing in 2 different setups with Php 7.4.3 ## Setup 1 ## Mysql Server version: 8.0.31 Distribution: Ubuntu 20.04.5 Linux Kernel: 5.15.0 Php Version: 7.4.3 PHP Warning: Packets out of order. Expected 1 received 0. Packet size=145 in... ## Setup 2 ## Mysql Server version: 8.0.30 Distribution: Ubuntu 20.04.5 LTS Linux Kernel: 5.4.0 Php Version: 7.4.3 PHP Warning: Packets out of order. Expected 1 received 0. Packet size=145 in... ------------------------------------------------------------------------ [2022-11-03 15:22:22] addi dot hurz at gmail dot com macOS 12.5.1 with arm CPU _ PHP 8.1.12 _ MySQL 8.0.31 all installed and freshly updated with homebrew script still produces: Warning: Packets out of order. Expected 1 received 0. Packet size=145 Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away ------------------------------------------------------------------------ [2022-09-06 14:06:49] peter dot maatman at rentman dot nl We are seeing this issue appear in production after we started migrating our production database servers from mysql 8.0.19 to 8.0.28. Our php version currently is 7.4.16 with pdo_mysql enabled, we run our php in a docker container based on the official php:7.4-fpm image. I can confirm that the test script reproduces the bug. ------------------------------------------------------------------------ [2022-03-07 16:20:31] maurice dot volaski at einsteinmed dot edu I am seeing this on my Mac with PHP 8.1.2 (Apache module) and MySQL 8.0.28 Homebrew. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=81335 -- Edit this bug report at https://bugs.php.net/bug.php?id=81335&edit=1

« previous php.bugs (#244129) next »