• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Connection Master Slave issue


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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.