Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Our current site is entirely developed in the cakePHP framework with the MVC architecture. If we notice more than around 19-20 users viewing the site at once, it begins to crawl to a hault and begin to time out.

Could this be a performance issue with MySQL? Possibly related to MVC - as the site relies heavily on communication with the SQL database. If so, would increasing the overall RAM help solve the issue?



open-files-limit                = 20000

#sql-mode                       = TRADITIONAL

#event-scheduler                = 1

### Cache
thread-cache-size               = 16
table-open-cache                = 2048
table-definition-cache          = 512

query-cache-size                = 32M
query-cache-limit               = 1M

### Per-thread Buffers
sort-buffer-size                = 1M
read-buffer-size                = 1M
read-rnd-buffer-size            = 8M
join-buffer-size                = 1M

### Temp Tables
tmp-table-size                  = 64M 
max-heap-table-size             = 64M

### Networking
back-log                        = 100
max-connections                 = 300
max-connect-errors              = 10000
max-allowed-packet              = 16M
interactive-timeout             = 600
wait-timeout                    = 60
net_read_timeout        = 30
net_write_timeout       = 30
# This value is the size of the listen queue for incoming TCP/IP connections.
back_log            = 128

#### Storage Engines
#default-storage-engine         = InnoDB

## Makes sure MySQL does not start if InnoDB fails to start. This helps
## prevent ugly silent failures.
innodb                          = FORCE

### MyISAM
key-buffer-size                 = 64M
myisam-sort-buffer-size         = 128M

innodb-buffer-pool-size         = 16M
innodb-log-buffer-size          = 4M
innodb-log-files-in-group      = 2

server-id                       = 1

log-error                       = /var/log/mysqld.log

max-allowed-packet      = 16M
share|improve this question
Please copy and paste your whole config file in this question. If your MySQL is Linux, that would be my.cnf. If you are using the Windows version of MySQL, that would be my.ini. If you did not setup a my.ini, please let me know. – RolandoMySQLDBA Feb 17 '12 at 18:22
@RolandoMySQLDBA I am not the webmaster for the site - just trying to help trouble shoot the issue. The webmaster sent a request to the host for the my.cnf file - as soon as I receive it I will post. Thanks. – Jeff Feb 17 '12 at 18:29
@RolandoMySQLDBA Config added – Jeff Feb 20 '12 at 14:14
up vote 3 down vote accepted

We use cake for some internal applications. And yes it does at times, pardon my french, suck. This isn't anything to do with mysql per se. Once you start defining more than basic models and go down the "has many"/"has many belongs to many" relationships, the underlying queries it generates can be less than sub par.

Do you have table with multi column primary keys? Forget about it.

Frankly there are just times you need to break the molding your framework is supposed to shield you from and write your sql more directly :-\

That being said, as with anything else interacting with your DB you'll want to ensure you have proper indexes and appropriate buffer pool/key buffer.

share|improve this answer
I just read something similar in the book high performance for mysql explaining about relationship queries and how these frameworks can cause bottlenecks with mysql. Thanks. – Jeff Feb 18 '12 at 15:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.