#5278 closed enhancement (wontfix)
Allow persistent MySQL connections
| Reported by: | mastermind | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Why not optionally allow persistent MySQL connections? Sometimes they can really help taking weight off the MySQL server.
in wp-config.php, add an option like:
define('DB_PERSISTENT', 'true');
in wp-includes/wp-db.php change around line 49:
$this->dbh = (DB_PERSISTENT == 'true') ? @mysql_pconnect($dbhost, $dbuser, $dbpassword) : @mysql_connect($dbhost, $dbuser, $dbpassword);
I don't know what effect this would on other servers/environments, but on an Apache with mod_php, it works very fine.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hm, I've played a bit with WP and persistent connections now, and maybe it's not such a good idea after all. :-/
Seems WP, PHP, Apache and MySQL don't play well together when it comes to persistent DB connections.