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

MySQL consume all my CPU

$
0
0
Hi, I have a production website since two years ago.

Bachecubano.com is a classiffieds website with a new and a improved functionalities to bring more power to the Buy & Sell in Cuba and Miami.

But in the last month I study some SEO thecniques that explode the visits to the website and then become the "Can't connect to the DB" error due to overloaded connections.

¿Hoy do I fix this? It seem to be a lot of users navigating the site.

This is the config database:

$db['mocha'] = array(
   'dsn' => '',
   'hostname' => 'localhost',
   'username' => 'bache',
   'password' => 'dtyjtyj',
   'database' => 'bache6',
   'dbdriver' => 'mysqli',
   'dbprefix' => '',
   'pconnect' => TRUE,
   'db_debug' => TRUE,
   'cache_on' => FALSE,
   'cachedir' => APPPATH . 'cache',
   'char_set' => 'utf8',
   'dbcollat' => 'utf8_general_ci',
   'swap_pre' => '',
   'encrypt' => FALSE,
   'compress' => FALSE,
   'stricton' => FALSE,
   'failover' => array(),
   'save_queries' => FALSE
);


What I doing wrong? I have a VPS with 4Gb RAM and 4 cores.
Sometoimes in the project I made some Joins, but I cant believe that 100 concurrent users consume all this.

This is the "top command in console"

31814 mysql     20   0  714m 201m 9124 S 49.5  9.6   248:10.89 mysqld
31814 mysql     20   0  714m 200m 9124 S 26.9  9.5   249:13.02 mysqld

Viewing all articles
Browse latest Browse all 14115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>