php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42665 PDO_MYSQL no persistent but idle connections
Submitted: 2007-09-14 05:19 UTC Modified: 2009-05-03 01:00 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:2 (50.0%)
From: vgass at gmx dot de Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2.4 OS: Linux (Debian)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
44 - 2 = ?
Subscribe to this entry?

 
 [2007-09-14 05:19 UTC] vgass at gmx dot de
Description:
------------
With an attempt to use PDO_MYSQL with PDO::ATTR_PERSISTENT => true I 
stated coincidentally that no persistent connections were used, but 
dozens idle "hanging" processes had remained open: one process for one 
call to "new PDO(...)"!

As an ISP this is catastrophic and we are missing the possibility to 
disable persistant connections as with mySQL. (settings like 
"mysql.allow_persistent" and "mysql.max_persistent")

mySQL: 4.0.25

Thanks for any help you can provide.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-20 06:25 UTC] vgass at gmx dot de
I have to correct: there is not one idle process per call, but idle 
processes accumulating.

No change with current snapshoot!

Additionaly: please add something like "mysql.allow_persistent" and 
"mysql.max_persistent" for mysqli and PDO_MYSQL as a feature request.
As an ISP we need a little control and influence...

And please excuse my bad English - I have nearly no more speaking/
writing practice since my school days 25 years ago.
 [2008-03-21 14:18 UTC] vgass at gmx dot de
No answer after that long period of time - it's a little disappointing.

Now I found by accident a document which explains that strange behavior.
See: http://de2.php.net/manual/en/features.persistent-connections.php

The surplus connections results from different child processes of the apache webserver.
Only possible solution: don't allow persistent connections.
But can't do that in php.ini, so I have to disable PDO_MYSQL at all! :-((
 [2009-04-25 14:50 UTC] jani@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-05-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 06:01:30 2024 UTC