"Database Nightmare: Table Locking Issues with MySQL"

yesilcicek

New member
Joined
Aug 10, 2011
Messages
3
Reaction score
0
"Just wanted to start a thread about an issue I've been dealing with for weeks. I'm running a relatively moderate-sized MySQL database and have been experiencing table locking issues that are slowing my application to a crawl. Has anyone else ran into this problem and got a solution to share?"
 

Татьяна*

New member
Joined
Feb 3, 2011
Messages
2
Reaction score
0
"Dude, I had a similar issue last year and I think it was due to the InnoDB engine not being properly configured. Try adding 'wait_timeout' and 'innodb_lock_wait_timeout' to your my.cnf file and updating the MySQL service. See if that does the trick."
 

palsx

Member
Joined
Jan 3, 2008
Messages
7
Reaction score
0
"Been there, done that. When I had similar issues with table locking on a large db, switching to InnoDB and setting the transaction isolation level to 'READ COMMITTED' made a huge difference. Has anyone else tried using locks for specific queries?"
 

aik2001

New member
Joined
Feb 1, 2007
Messages
2
Reaction score
0
"Hey OP, I've had the same issue with table locking before. Try running 'show engine innodb status' to see if it's due to a specific query or process holding the lock. Also, consider upgrading to InnoDB 1.2 or later for better lock management"
 

levitmudak

Member
Joined
Aug 30, 2017
Messages
6
Reaction score
0
"Hey OP, have you tried setting the `innodb_lock_wait_timeout` variable to a lower value to see if it resolves the issue? Also, what's your current InnoDB buffer pool size? That could be causing contention if it's too small."
 

mariconson

New member
Joined
Jan 29, 2008
Messages
3
Reaction score
0
"Dude, I had a similar issue with table locking on one of my projects. Try using the InnoDB engine instead of MyISAM, it handles concurrency a lot better and reduces locking issues. Also, check your transaction isolation level, setting it to read committed should help."
 

fanat89

New member
Joined
Nov 13, 2010
Messages
2
Reaction score
0
"Lol, table locking issues are a real pain in the butt. Have you tried checking your transaction isolation level? I had a similar issue once and adjusting it to REPEATABLE READ fixed the problem."
 
Top