title: Joomla database memory leak
body: <p>My client has got a pretty large Joomla-based website hosted on Amazon EC2 with 1.5GB of RAM. The server hosts both Apache and MySQL. Right now the database size is around 250MB and the website gets daily traffic of about 5000. It looks like there is a severe memory leak on the website as sometimes MySQL uses about 99% of CPU memory and then crashes. I have tried optimizing database tables, modifying my<code>.cnf</code>, but still there is no improvement.</p>
  
  <p>There are finder tables used by Joomla smart search which occupy over 100MB of db size. I have disabled smart search, but still the problem occurs.</p>
  
  <p>Friends, please throw some suggestions in fixing this.</p>
  
  <p>Thanks.</p>
  
  <p>Below is the my.cnf file</p>
  
  <pre><code>[mysqld]
  datadir=/var/lib/mysql
  socket=/var/lib/mysql/mysql.sock
  
  symbolic-links=0
  bind-address            = 127.0.0.1
  
  default-storage-engine=innodb
  transaction-isolation    =   REPEATABLE-READ
  character-set-server    =   UTF8
  collation-server      =   UTF8_general_ci
  
  max_connections         = 5000
  wait_timeout            = 30
  connect_timeout         = 60
  #interactive_timeout     = 600
  #max_connect_errors      = 1000000
  #max_allowed_packet      = 10M
  
  
  skip-external-locking
  key_buffer_size = 384M
  max_allowed_packet = 1M
  table_open_cache = 512
  sort_buffer_size = 2M
  read_buffer_size = 2M
  read_rnd_buffer_size = 8M
  myisam_sort_buffer_size = 64M
  thread_cache_size = 8
  query_cache_size = 32M
  # Try number of CPU's*2 for thread_concurrency
  thread_concurrency = 8
  
  slow_query_log
  long_query_time = 2
  
  [mysqld_safe]
  log-error=/var/log/mysqld.log
  myisam_sort_buffer_size = 64M
  </code></pre>