Bug->Doc #78690 [Opn]: Database persistent connection leaks with ZTS and Event, Worker MPMs
| From: | cmb@php.net | Date: | Wed, 09 Jun 2021 10:28:56 +0000 |
| Subject: | Bug->Doc #78690 [Opn]: Database persistent connection leaks with ZTS and Event, Worker MPMs | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18835@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78690&edit=1
ID: 78690
Updated by: cmb@php.net
Reported by: coladict at gmail dot com
Summary: Database persistent connection leaks with ZTS and
Event, Worker MPMs
Status: Open
-Type: Bug
+Type: Documentation Problem
-Package: Apache2 related
+Package: MySQLi related
Operating System: Linux
PHP Version: 7.2.23
Block user comment: N
Private report: N
New Comment:
Persistent connections are stored in process memory, not in any
kind of shared memory. For prefork MPM, all child processes have
access to that process memory, for worker MPM they have not, so
each child process has its opwn set of persistent connections.
It's the same with (F)CGI. That should be documented.
Previous Comments:
------------------------------------------------------------------------
[2019-10-18 13:09:25] coladict at gmail dot com
Description:
------------
When using the Prefork MPM, persistent MySQLi connections (for example, but not limited to MySQLi)
are reused.
When using other MPMs, they are not. For traced it to:
ext/mysqli/mysqli_nonapi.c: 166
The EG(persistent_list) macro always returns a new list. This results in reaching the MySQL
server's connection limit (default at 151) with having all of them waiting in sleep.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78690&edit=1