Two servers, one apache one MySQL

Events happening in the community are now at Drupal community events on www.drupal.org.
djudd's picture

I am trying to add a second server to just run MySQL to our site. The first server would continue to run Apache.

I point the settings.php file to the new server, and everything is fine for a short time, then tables start locking, connecting fill up with Sleep processes, and the MySQL crashes.

Anyone have any ideas as to why this would be happening?

Comments

Sounds like you might be

jburnett's picture

Sounds like you might be running into a locking issue because of MyISAM tables in your database. Have you looked to see what the storage engine is for your tables? MyISAM uses table level locking in a lot of cases where INNODB could use row level locking and not be near as impactful on your performance.

It may because of mulitple

navaneeth_r's picture

It may because of mulitple connection at the server. Try to reduce the sleep second of mysql.

set-variable=wait_timeout=xxx(seconds)

to end up the connection.

@navaneeth - what you are

karthik s's picture

@navaneeth - what you are saying is perfectly right.

The reason for connections to rapidly increase in certain scenarios could be because the connection may not have been closed in the program properly or the need for the connections to persists. In such scenarios to prevent these connections to accumulate, it is good for us to configure the sleep timeout as suggested.

It may also useful which table is getting locked by seeing processlist.
and ensure the frequently locked tables are of storage engine, innodb.

Thanks,
karthik

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: