Welcome Guest, Not a member yet? Register   Sign In
CI 3.0.6 and MaxScale
#1

(This post was last modified: 09-07-2017, 04:46 PM by tibon.)

Hello,

I'm facing an odd issue, my setup is as the following:
MaxScale -> Master -> Slaves (MariaDB 10.2)

Once the CI server is live and the users are starting to send requests the MaxScale is getting spammed with tons of connections and getting maxed out(from 100 connections to 3000).

I've then tried to make a direct connection from the CI to the master, the connection problem disappeared and everything went back to normal(around 150 connections) so the issue only appear when the CI is connected to the MaxScale.

The exact same MaxScale server is being used by other PHP frameworks with different DB class and everything is working perfectly(not sure if it's allowed to mention which but 2 popular frameworks without persistent connections).

Do you have an idea of what can be the cause that CI spams the MaxScale with connections but not the Master?

Thanks in advance.
Reply
#2

I don't know anything aboute MaxScale, but if you use /application/config/database.php, in the config array:
set the option 'pconnect' => TRUE to FALSE. That should by default.

Other solution is maybe not to autoload the database, only when you need.
You can do something like $this->load->database()
Reply
#3

(09-07-2017, 10:46 PM)bartje1974 Wrote: I don't know anything aboute MaxScale, but if you use /application/config/database.php,  in the config array:
set the option 'pconnect' => TRUE to FALSE. That should by default.

Other solution is maybe not to autoload the database, only when you need.
You can do something like $this->load->database()

Yeah, the pconnect is set to FALSE.
As for the autoload, I would prefer to try different sql proxy before making such a huge change. Something doesn't add up in here.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB