Home  >  Article  >  Database  >  MySQL与句柄_MySQL

MySQL与句柄_MySQL

WBOY
WBOYOriginal
2016-06-01 13:43:251590browse

bitsCN.com

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

01
Handle type summary:
02
  Desktop         : 1
03
  Directory       : 2
04
  Event           : 301663
05
  File            : 125
06
  IoCompletion    : 17
07
  Key             : 8
08
  KeyedEvent      : 1
09
  Mutant          : 24
10
  Port            : 2
11
  Semaphore       : 10
12
  Thread          : 207
13
  WindowStation   : 2
14
Total handles: 302062
2.2.MySQL相关参数

1
query_cache_size 84M
2
innodb_buffer_pool_size 250M
3
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



本文来自于开源中国社区 作者 HowardX.D.Hua

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn