mirror of https://github.com/BOINC/boinc.git
web: don't use persistent connections with mysqli
I recently changed the web code to use the PHP mysqli interface if available. I noticed that it often get "can't connect - too many connections" errors, even on small projects. This is probably due to the use of persistent connections, so I took that out.
This commit is contained in:
parent
d1b2c57c37
commit
ae1b16914f
|
@ -34,7 +34,8 @@ class DbConn {
|
|||
} else {
|
||||
$port = null;
|
||||
}
|
||||
if (version_compare(PHP_VERSION, '5.3.0') < 0) {
|
||||
//if (version_compare(PHP_VERSION, '5.3.0') < 0) {
|
||||
if (1) { // don't use persistent connections for now
|
||||
$this->db_conn = new mysqli($host, $user, $passwd, $name, $port);
|
||||
} else {
|
||||
$this->db_conn = new mysqli("p:".$host, $user, $passwd, $name, $port);
|
||||
|
|
Loading…
Reference in New Issue