Re: Limited connections to the database. .

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, I should've replied to your post first, but, have you tried manually limiting the connections via PHP?
Code used from Omega Engine (Copyright Omega Vortex):

$ini_data =& $engine->ini_data['file'];
setup_errors();
if ($ini_data['DB']['connections'] > 5) {
$engine->error = "There are too many connections to the database, please try again later.";
   $engine->toggle_errbits(ERR_CONNECT);
   $engine->engine_die();
}

That code checks the connections value in the ini file to see if it's greater than 5, if it is, it returns an error telling the visitor to try again later.

Please note in order to make this work, at least 2-3 other functions would have to be used. I'd be more than happy to write them for you if you need it.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux