Welcome Guest, Not a member yet? Register   Sign In
$db['default']['pconnect'] = TRUE; and too many database connections error
#1

[eluser]searain[/eluser]
Hi,

I think the general practice in php, the default set up for persistent connection is 'FALSE'. I am using mysql.

Due to codeigniter set up the persistent connections as default.

1) There should NOT be any code logic difference in setting the mysql persistent connection to be true or false, right?

2) Why persistent connection to be true win the arguments? But at the same time, it seems to me more people in php/mysql community prefer that the persistent connection to be false? So persistent connection to be true win in CI must have good reasons, what are they? Thanks!

3) My server host dozens CodeIgniter sites, this persistent connections cause too many connection problems.

So I either to set up mysql server to allow connections to a very large number (or unlimited) or I have to set up mysql connection to be non-persistent in CodeIgniter by setting $db['default']['pconnect'] = FALSE; RIGHT?

What solution should I take? What are the advantages and disadvantages in these two approaches? For what kind cases (environments) I should which approach? Is that the choice between more loads on MySQL server or more loads on php?

Thanks!


Messages In This Thread
$db['default']['pconnect'] = TRUE; and too many database connections error - by El Forum - 03-05-2011, 04:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB