Bug #47821 | Can't create/write to file (Errcode: 22) | ||
---|---|---|---|
Submitted: | 5 Oct 2009 5:54 | Modified: | 6 Oct 2009 11:32 |
Reporter: | Aniket Samudra | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Performance Schema | Severity: | S2 (Serious) |
Version: | 5.1.36 | OS: | Windows (64-bit mysql) |
Assigned to: | CPU Architecture: | Any | |
Tags: | error code 22, performance |
[5 Oct 2009 5:54]
Aniket Samudra
[5 Oct 2009 5:56]
Aniket Samudra
After changing the tmpdir in My.ini, the path in the exception changes. We have searched the bugs database. For ErrorCode 13 we've to change/reset the permissions, although this is error-code 22, still we checked the permissions and available disk-space for tmpdir are correct
[5 Oct 2009 6:14]
Valeriy Kravchuk
If each of your threads is doing some select that access (several? 3 in your example) MyISAM tables, then 685 of them may need too many open file handles for current implementation on Windows (2048). Check http://dev.mysql.com/doc/refman/5.1/en/limits-windows.html. Try with SELECT that accesses one table only, and you should be able to get more concurrent threads.
[5 Oct 2009 8:26]
Aniket Samudra
Thanks a lot for a prompt reply. So does this mean we hit a bottleneck here? The only solution is to optimize the query to open lesser number of tables that will allow us to use more threads correct? or is there any other parameter or change to 64-bit o/s will resolve the issue. Let me know so that i can close the defect then.
[5 Oct 2009 11:55]
MySQL Verification Team
See bug: http://bugs.mysql.com/bug.php?id=24509.
[5 Oct 2009 16:24]
Valeriy Kravchuk
You can reduce number of on-disk temporary tables needed also, by setting some more reasonable values in my.ini instead of: tmp_table_size= 1M max_heap_table_size = 4096M I'd suggest to start with: tmp_table_size= 16M max_heap_table_size = 16M But whatever you do you should just remember that in current MySQL 5.x versions on Windows you can not have more than 2048 files handles open by all running threads of mysqld.exe at any given time. This is a documented limitation. The problem is fixed in a newer codebase (see that bug Miguel mentioned), but is still present in 5.1.x.
[6 Oct 2009 11:32]
Aniket Samudra
We are satisfied with the replies by you guys and this helps us on our tasks. We are closing the bug now.