CodeIgniter Forums
MySQL Codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: MySQL Codeigniter (/showthread.php?tid=63579)



MySQL Codeigniter - Edwin - 11-16-2015

Hi all,

I meet the problem about MySQL "Too Many Connections" and i suspect this is causing by my MySQL script without close after run the query.

Actually, i'm using active record to do my query but all the time i didn't close mysql connection after run the query.

Does it will cause the issue too many connection?

some more, in config/database.php there is one option called $db['default']['pconnect']=TRUE, True value by default and the description said "Whether to use a persistent connection". what does it mean? will this causing too many connection too?

Any advise is appreciate!! Thanks !!


RE: MySQL Codeigniter - InsiteFX - 11-16-2015

$db['default']['pconnect']=FALSE;

This should always be FALSE. even MySQL recommends it.

You can also check your MySQL my.ini settings file to make sure the connections are high enough.


RE: MySQL Codeigniter - Edwin - 11-18-2015

(11-16-2015, 05:15 AM)InsiteFX Wrote: $db['default']['pconnect']=FALSE;

This should always be FALSE. even MySQL recommends it.

You can also check your MySQL my.ini settings file to make sure the connections are high enough.

Thanks for advice~