Persistant connections not working with mysqli driver in codeIgniter Persistant connections not working with mysqli driver in codeIgniter codeigniter codeigniter

Persistant connections not working with mysqli driver in codeIgniter


Referring to your other thread my assumption that you specified to use persistent connections seems to be true, but taking a look at the source code of CodeIgniter we can come to a different conclusion: The MySQL driver actually notices this option begin set. Whereas the MySQLi driver, as you correctly analyzed, does not. This has been also remarked in a bug report and already been fixed.

As you can see the whole MySQLi driver class was rewritten in the development branch.

Therefore you have used persistent connections until now, but (unwillingly) stopped using them when switching to MySQLi, because this fix has not been released... you could try to use the development branch, if this is an option. (Or only replace this single file ... should work too.)

Your other option is, like I stated in my other answer, that you briefly estimate the used connections by your application and resize the max_connections limit according to your real needs.