Bug #36256 | error 1032 Can't find record in [tablename] | ||
---|---|---|---|
Submitted: | 22 Apr 2008 13:18 | Modified: | 10 May 2010 8:10 |
Reporter: | Horst Pralow | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.67-community | OS: | Linux (SLES 10, 64-bit, 8 CPU) |
Assigned to: | CPU Architecture: | Any |
[22 Apr 2008 13:18]
Horst Pralow
[22 Apr 2008 13:20]
Horst Pralow
INSERT-SELECT Statemant and Table structure
Attachment: structure.txt (text/plain), 10.81 KiB.
[13 May 2008 12:25]
Sveta Smirnova
Thank you for the report. Please provide output of `df` command. Would be better if you could check free space in time when error occurs.
[13 May 2008 12:40]
Horst Pralow
In Reply to [13 May 14:25] Sveta Smirnova >Please provide output of `df` command. Would be better if you could >check free space in time when error occurs. Output of df follows: # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 15735128 7773060 7962068 50% / tmpfs 8177604 12 8177592 1% /dev/shm /dev/sda3 1133042276 867277636 208209368 81% /sbs The database files are on /dev/sda3, Temp-Files on /dev/sda2. The values given above were take immediately after an error 1032 was reported into the log-file.
[15 May 2008 9:48]
Susanne Ebrecht
Horst, many thanks for writing a bug report. For me this sounds more like a system overload. Please monitor I/O. Also you can try to use I/O scheduler: deadline Also check timeout variables and maybe set them to higher values. If you didn't increase the variable table_cash then do it now. Please, let us know if something of the above is helping you. To analyse if there is a bug we need to know how to reproduce it. Looking to your description above my suggestion is that this is not a bug only a tuning issue.
[21 May 2008 11:26]
Horst Pralow
Some remarks on the recommendations from Susanne Ebrecht: 1. I doubt this is primarirly a system overload problem. If it were, I would expect to see erroneous database behaviour with any kind of SQL statement, but that's not the case. 2. I have increased table_cache from 5000 to 10000 with no noticeable change. I had increased it from default to a fairly large value months ago, but still had a huge value in 'Opened_tables'. Since the manual suggest this to be an indicator of table_cache beeing too small, I increased i further. Tests however have show that the large value of Opened_tables is caused by the usage of temporary tables in my application: Every 'create temporary table ... ' increments 'Opened_tables' by 2 and thus it is not indicative for table_cache size being too small. 3. I haven't tried dealine I/O scheduler yet (no chance to reboot the production server so far). 4. Could you name which timeout variables could possibly have impact on our problem? There are no timeouts reported in my logs. The value in 'Innodb_row_lock_time_max' is far smaller than innodb_lock_wait_timout, so I don't see a problem here. 5. If we had a mere tuning problem I'd expect slow but reliable operation or timeouts. That is what I would call a tuning problem. And if it were such, then at least the error message would be totally misleading! I will try to export the 3 tables involved and then create a test environment, although I doubt it will be possible to reproduce the problem without the concurrency imposed by multiple users in production environment. For me the problem currently look more like being related with read consistency the iwth I/O performance.
[10 Feb 2009 13:59]
MySQL Verification Team
Horst - do you use a transaction isolation level other than repeatable read ?
[10 Feb 2009 14:12]
Horst Pralow
In replay to [10 Feb 14:59] Shane Bester >Horst - do you use a transaction isolation level other than repeatable read ? No. In the meantime we have upgraded hardware and OS as well as MySQL . The problem still occurs. As a workaround I now repeat the select immediately (at most) a second time if the first try yields error 1032 hoping everything needed may now be in main memory. Most times the second try will succeed but a few times a day it still fails.
[6 May 2010 7:30]
MySQL Verification Team
I had never been able to repeat this exact problem. However, it is probably some locking bug, similar to the likes of bug #41756 Another cause might have been when the SELECT part of INSERT .. SELECT had a lock wait timeout, the error wasn't properly handled further up the chain. I'd be curious is this still happens with 5.1.46 version?
[10 May 2010 8:10]
Horst Pralow
>I'd be curious is this still happens with 5.1.46 version? I can't tell since we have changed our application's implementation so that the SQL-statement causing the errors in question no longer exits.