php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #35309 Database connection pooling
Submitted: 2005-11-21 10:33 UTC Modified: 2013-10-28 20:12 UTC
Votes:5
Avg. Score:3.8 ± 1.6
Reproduced:0 of 0 (0.0%)
From: lauris at nix dot lv Assigned: krakjoe (profile)
Status: Closed Package: *General Issues
PHP Version: 6CVS-2005-11-21 (CVS) OS: any
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lauris at nix dot lv
New email:
PHP Version: OS:

 

 [2005-11-21 10:33 UTC] lauris at nix dot lv
Description:
------------
To gain performace when using databases php should have  connection pooling so connections could be shared and would not need to reopen them on each client connection. It would be great to have per application configurable connection pooling.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-22 11:49 UTC] tony2001@php.net
Feel free to send a patch.
 [2007-08-20 22:15 UTC] michael at chunkycow dot com dot au
This would make more sense implemented in the DB lib and if DB connections are really that expensive maybe you should look at memcached or something simmilar.
Is there a reason you require pooling that the current pconnect stuff won`t make you happy?
 [2012-10-27 23:51 UTC] will dot skates at ntlworld dot com
Needs Closing.
 [2013-10-28 20:12 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: krakjoe
 [2013-10-28 20:12 UTC] krakjoe@php.net
The threading model that is in widest use does not lend itself to such things; Zend is meant to put up and tear down as quickly as possible, that includes mysql connections. 

PHP has tinkered with this sort of thing, persistent connections; it is always the wrong route to take.

Even where the threading model does lend itself to pooling connections, maybe in a fpm or apache2 worker environment, it is just out of the scope of PHP to implement the pooling, as suggested, and as in other languages (java springs to mind), the pooling should occur at the level of the driver, not at the level of the VM or extension (driver abstraction). Were such things available at the driver, we would then have a chance to make use of them, but it just impractical to implement right here.

Closing the request.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC