Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Database Connection Master Slave issue

$
0
0
Hi

I am trying to connect 2 database one for read and another for write. I am using  following code for 2 connection.
In Contructor

 $this->WRITE = $this->load->database('write', TRUE);   //-- master
 $this->READ = $this->load->database('read', TRUE); //-- slave

But whenever I execute my query the database server My WRITE DB goes to 100% in few 1000 concurrent connection.  I check with Processlist command in write db and it shows sleep queries increase, even my query contains read(select query). There is no load in read db but my Write db load goes very high. 

We are using RDS database


Please help



regard
Hitender

Viewing all articles
Browse latest Browse all 14348

Trending Articles