1.环境
OS:Win 2003 Server (X86)
DB:MySQL 5.1.30-community-log
2.问题
MySQL Server占用的句柄数过大,使用过程消费句柄速度比释放速度来的快,部分其他应用申请不到句柄,导致不可用。
2.1.Handle
>handle.exe -s -p mysqld.exe
Handle type summary:
Desktop : 1
Directory : 2
Event : 301663
File : 125
IoCompletion : 17
Key : 8
KeyedEvent : 1
Mutant : 24
Port : 2
Semaphore : 10
Thread : 207
WindowStation : 2
Total handles: 302062
2.2.MySQL相关参数
query_cache_size 84M
innodb_buffer_pool_size 250M
innodb_thread_concurrency 18
3.想到的解决办法
3.1.关闭QueryCache
3.2.关闭innodb_thread_concurrency
3.3.OS用Win X64或者非Win版替代
4.延伸阅读
http://bugs.mysql.com/bug.php?id=45252