Hi, I run a popular PTC website but lately I am getting lot's of database problems. My RAM Memory & Disk Space are fine. the problem is that users are receiving very much "Cannot Connect" message when browsing through the site. This is what our server administrator said: Hello, When I checked I could see that the table "tb_users" in database "buxp00_buxpv2" was getting too many locked states. I have repaired that table. But after the repair also, that table was getting corrupted soon. ================== [root@buxp00 buxp00_buxpv2]# myisamchk -c tb_users.MYI Checking MyISAM file: tb_users.MYI Data records: 40810 Deleted blocks: 0 myisamchk: warning: 1 client is using or hasn't closed the table properly - check file-size myisamchk: warning: Size of indexfile is: 406528 Should be: 335872 myisamchk: error: Size of datafile is: 6989016 Should be: 6989752 - check record delete-chain - check key delete-chain - check index reference - check data record references index: 1 myisamchk: error: Found 95 keys of 40810 - check record links myisamchk: error: Keypointers and record positions doesn't match myisamchk: warning: Found 40810 parts Should be: 40849 parts MyISAM-table 'tb_users.MYI' is corrupted ================== Usually with MyISAM table, you will get (long) table level read lock, then a write lock (it was blocked by the previous read lock), then for read lock (it was blocked by previous, write, still pending). This is how MyISAM works, by design. You should NOT allow long-running concurrent statements, or just wait. In order to avoid this, you can proceed with following solutions. 1. Optimize tables, indexes and queries. 2. Do not use persistent connections in general (there might be conditions where they may be useful, but usually making a connection is so fast that this is better than keeping all those connections open). 3. Optimize your configuration to make optimal use of available memory. 4. Do not keep connections to your db server open when you don't need them (e.g. after querying your database your application initiates a download). 5. Keep the number of connections in your application to a minimum (avoid nested queries). Here, we have already optimized the MySQL configuration(Solution 3). Please contact your database administrator and optimize the MySQL queries as mentioned in the above suggestions. Thank you for your understanding. Regards, Alwin C. SoftLayer Support Code (markup): Now I am looking for someone who can solve the problem and I am willing to pay for it. The website is http://buxp.info If interested, PM me with your rates and how you would solve it Best Regardss