Bug #62381 | Insert records LOCKED nearly all the queries in process list | ||
---|---|---|---|
Submitted: | 8 Sep 2011 7:20 | Modified: | 16 Feb 2012 20:06 |
Reporter: | Felix Wan | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | MySQL Server: Locking | Severity: | S2 (Serious) |
Version: | 5.1.52 | OS: | Linux (RHEL 5) |
Assigned to: | CPU Architecture: | Any | |
Tags: | insert, large query cache, limited open_tables, locked, PROCESSLIST |
[8 Sep 2011 7:20]
Felix Wan
[10 Sep 2011 13:40]
Valeriy Kravchuk
Please, send entire result set of SHOW FULL PROCESSLIST when this problem happens. Also I do not understand if this table it still InnoDB or is it already replaced with MyISAM one(s) when this problem happens.
[13 Sep 2011 11:14]
Felix Wan
print process list * 3 times
Attachment: processlist.log (text/x-log), 133.16 KiB.
[13 Sep 2011 11:15]
Felix Wan
"time_stream" table is using MyISAM engine already.
[13 Sep 2011 11:18]
Felix Wan
Sorry, I need to correct my create table sql. | time_stream | CREATE TABLE `time_stream ` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `streamId` int(11) unsigned NOT NULL, `duration` int(11) unsigned NOT NULL DEFAULT '0', `packetId` bigint(20) unsigned NOT NULL DEFAULT '0', `createTime` datetime NOT NULL, `updateTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `streamId` (`streamId`,`duration`), KEY `idx_duration` (`duration`), KEY `idx_createTime` (`createTime`) ) ENGINE=MyISAM AUTO_INCREMENT=253714 DEFAULT CHARSET=utf8 |
[22 Sep 2011 9:11]
Felix Wan
Dear Developers, We can constantly reproduce this issue now. Before we start, set query cache size to 2GB. 1. Create ten tables time_stream[0-9] using the same schema. 2. insert (10000 streams * 1000 duration) records for each table. 3. select all these items one by one. 4. keep an eye on show status like '%cache%" until we used up half of the cache. | Qcache_free_memory | 969126840 | 5. insert into one table of time_stream[0-9] using streamId=10001,duration=0... 6. It takes us about one minute to finish the statement. 7. show status like '%cache%'; tell us Qcache_free_memory | 993395600 . Free a a lot of memory here. Here is the profiling data: Status * Duration * starting 0.000046 checking permissions 0.000006 Opening tables 0.000008 System lock 0.000004 Table lock 0.000003 init 0.000023 update 53.916252 end 0.000008 query end 0.000003 freeing items 0.00005 logging slow query 0.000002 logging slow query 0.000009 cleaning up 0.000003 ----- But I don't understand what does it exactly mean by "update"? Thanks.
[22 Sep 2011 9:21]
Valeriy Kravchuk
Looks related to bug #21074.
[22 Sep 2011 9:26]
Felix Wan
Thanks for your reply. I've checked that bug before, it seems like it'd been solved since 5.1.44 and we are using 5.1.52.
[23 Sep 2011 11:01]
Felix Wan
We worked around it by disabling the query cache completely.
[16 Jan 2012 20:06]
Sveta Smirnova
Thank you for the feedback. This looks like bug #54584. Are your parallel SELECTs blocked? I also could not repeat described behavior in latest development version using provided test case. Which value of query_cache_size do you have? Could you also please try with latest version 5.1.61 to be sure it is not fixed in your environment?
[17 Feb 2012 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".