MySQL Forums
Forum List  »  InnoDB

Re: InnoDB: Warning: a long semaphore wait:. X-lock on RW-latch
Posted by: Erik Morton
Date: December 28, 2008 07:46AM

The id column on orders is PRIMARY KEY. id on sessions is also PRIMARY KEY.

There was no index on the order_id column on the line_items table. The table only has 130,000 rows, but any time the application loaded an order it would scan the entire table for its line_items. The index has been added.

The UPDATE


I didn't kill any threads.

There are no queries that would join with sessions.

So does the following (from the error log) mean that the sessions table is indeed locked?

---TRANSACTION 0 2004317, ACTIVE 270 sec, process no 1440, OS thread id 1164314960 updating or deleting, thread declared inside InnoDB 499
mysql tables in use 1, locked 1
2 lock struct(s), heap size 368
MySQL thread id 107, query id 2118811 ip-10-250-59-241.ec2.internal 10.250.59.241 storefront Updating
UPDATE `sessions` SET `data` = '...', `updated_at` = '2008-12-23'

Thanks for the help. This is very useful.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: InnoDB: Warning: a long semaphore wait:. X-lock on RW-latch
5036
December 28, 2008 07:46AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.