select EVENT_NAME ,SUM_NUMBER_OF_BYTES_ALLOC from memory_summary_global_by_event_name order by SUM_NUMBER_OF_BYTES_ALLOC desc limit 10;

memory_summary_by_account_by_event_name |
| memory_summary_by_host_by_event_name |
| memory_summary_by_thread_by_event_name |
| memory_summary_by_user_by_event_name |
| memory_summary_global_by_event_name

首先是程序报错:

ERROR 1135: Can't create a new thread (errno 12). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug

查看日志:key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections =2340507 K

配置文件中 innodb_buffer_pool_size = 2G,在32位操作系统下 mysql 的内存超过了4GB,不崩溃才怪咧。。。

  1. InnoDB: Fatal error: cannot allocate 196608 bytes of
  2. InnoDB: memory with malloc! Total allocated memory
  3. InnoDB: by InnoDB 2307421120 bytes. Operating system errno: 12
  4. InnoDB: Cannot continue operation!
  5. InnoDB: Check if you should increase the swap file or
  6. InnoDB: ulimits of your operating system.
  7. InnoDB: On FreeBSD check you have compiled the OS with
  8. InnoDB: a big enough maximum process size.
  9. InnoDB: We now intentionally generate a seg fault so that
  10. InnoDB: on Linux we get a stack trace.
  11. mysqld got signal 11;
  12. This could be because you hit a bug. It is also possible that this binary
  13. or one of the libraries it was linked against is corrupt, improperly built,
  14. or misconfigured. This error can also be caused by malfunctioning hardware.
  15. We will try our best to scrape up some info that will hopefully help diagnose
  16. the problem, but since we have already crashed, something is definitely wrong
  17. and this may fail.
  18. key_buffer_size=402653184
  19. read_buffer_size=2093056
  20. max_used_connections=167
  21. max_connections=600
  22. threads_connected=167
  23. It is possible that mysqld could use up to
  24. key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 2340507 K
  25. bytes of memory
  26. Hope that's ok; if not, decrease some variables in the equation.
  27. thd=(nil)
  28. Attempting backtrace. You can use the following information to find out
  29. where mysqld died. If you see no messages after this, something went
  30. terribly wrong...
  31. Cannot determine thread, fp=0x2d2aae98, backtrace may not be correct.
  32. Stack range sanity check OK, backtrace follows:
  33. 0x8101ff5
  34. 0x996420
  35. (nil)
  36. 0x82a0986
  37. 0x82648ac
  38. 0x81a2249
  39. 0x67949b
  40. 0x5f942e
  41. New value of fp=(nil) failed sanity check, terminating stack trace!
  42. Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
  43. stack trace is much more helpful in diagnosing the problem, so please do
  44. resolve it
  45. The manual page at http://www.mysql.com/doc/en/Crashing.html contains
  46. information that should help you find out what is causing the crash.
  47. Number of processes running now: 0
  48. 120419 16:42:05  mysqld restarted
  49. 120419 16:42:05  InnoDB: Database was not shut down normally.
  50. InnoDB: Starting recovery from log files...
  51. InnoDB: Starting log scan based on checkpoint at
  52. InnoDB: log sequence number 2391 788299922
  53. InnoDB: Doing recovery: scanned up to log sequence number 2391 793542656
  54. InnoDB: Doing recovery: scanned up to log sequence number 2391 798785536
  55. InnoDB: Doing recovery: scanned up to log sequence number 2391 804028416
  56. InnoDB: Doing recovery: scanned up to log sequence number 2391 809271296
  57. InnoDB: Doing recovery: scanned up to log sequence number 2391 814514176
  58. InnoDB: Doing recovery: scanned up to log sequence number 2391 819757056
  59. InnoDB: Doing recovery: scanned up to log sequence number 2391 824999936
  60. InnoDB: Doing recovery: scanned up to log sequence number 2391 830242816
  61. InnoDB: Doing recovery: scanned up to log sequence number 2391 835485696
  62. InnoDB: Doing recovery: scanned up to log sequence number 2391 840728576
  63. InnoDB: Doing recovery: scanned up to log sequence number 2391 845971456
  64. InnoDB: Doing recovery: scanned up to log sequence number 2391 851214336
  65. InnoDB: Doing recovery: scanned up to log sequence number 2391 856457216
  66. InnoDB: Doing recovery: scanned up to log sequence number 2391 861700096
  67. InnoDB: Doing recovery: scanned up to log sequence number 2391 866942976
  68. InnoDB: Doing recovery: scanned up to log sequence number 2391 872185856
  69. InnoDB: Doing recovery: scanned up to log sequence number 2391 877428736
  70. InnoDB: Doing recovery: scanned up to log sequence number 2391 882671616
  71. InnoDB: Doing recovery: scanned up to log sequence number 2391 887914496
  72. InnoDB: Doing recovery: scanned up to log sequence number 2391 893157376
  73. InnoDB: Doing recovery: scanned up to log sequence number 2391 898400256
  74. InnoDB: Doing recovery: scanned up to log sequence number 2391 903643136
  75. InnoDB: Doing recovery: scanned up to log sequence number 2391 908886016
  76. InnoDB: Doing recovery: scanned up to log sequence number 2391 914128896
  77. InnoDB: Doing recovery: scanned up to log sequence number 2391 919371776
  78. InnoDB: Doing recovery: scanned up to log sequence number 2391 924614656
  79. InnoDB: Doing recovery: scanned up to log sequence number 2391 929389979
  80. 120419 16:42:08  InnoDB: Starting an apply batch of log records to the database...
  81. InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
  82. InnoDB: Apply batch completed
  83. InnoDB: Last MySQL binlog file position 0 248513413, file name /data/mysqlbinlog/mysql-bin.1554
  84. 120419 16:43:23  InnoDB: Flushing modified pages from the buffer pool...
  85. 120419 16:43:59  InnoDB: Started
  86. /usr/local/mysql/libexec/mysqld: ready for connections.
  87. Version: '4.0.26-log'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution

MySQL 内存溢出的更多相关文章

  1. Solr Dataimporthandler 导入MySQL 内存溢出。

    最近准备把一千九百多万数据导入Solr中,在以前测试数据只有一两百万,全量导入没有任务问题.但是,换成一千九百万数据时,solr报内存异常(java.lang.OutOfMemoryError:GC ...

  2. tomcat mysql 内存溢出的问题

    原因是mysql的密码有问题 解决办法: 具体操作步骤: 关闭 mysql: # service mysqld stop 然后: # mysqld_safe --skip-grant-tables 启 ...

  3. [转]solr DataImportHandler 解决mysql 表导入内存溢出问题

    最近一个项目要用到solr做全文检索,开始盲人摸象. 用tomcat 7 开始配置,开始正常,但是遇到cookie里有中文就报错. 无奈,换tomcat 6, 结果DataImportHandler ...

  4. php查询mysql返回大量数据结果集导致内存溢出的解决方法

    web开发中如果遇到php查询mysql返回大量数据导致内存溢出.或者内存不够用的情况那就需要看下MySQL C API的关联,那么究竟是什么导致php查询mysql返回大量数据时内存不够用情况? 答 ...

  5. PDO之MySql持久化自动重连导致内存溢出

    前言 最近项目需要一个常驻内存的脚本来执行队列程序,脚本完成后发现Mysql自动重连部分存在内存溢出,导致运行一段时间后,会超出PHP内存限制退出 排查 发现脚本存在内存溢出后排查了一遍代码,基本确认 ...

  6. 线上mysql内存持续增长直至内存溢出被killed分析(已解决)

    来新公司前,领导就说了,线上生产环境Mysql库经常会发生日间内存爆掉被killed的情况,结果来到这第一天,第一件事就是要根据线上服务器配置优化配置,同时必须找出现在mysql内存持续增加爆掉的原因 ...

  7. tomcat内存溢出处理

    tomcat内存溢出设置JAVA_OPTS  答案1设置Tomcat启动的初始内存 其初始空间(即-Xms)是物理内存的1/64,最大空间(-Xmx)是物理内存的1/4.可以利用JVM提供的-Xmn ...

  8. 游戏服java程序启动,显示内存溢出

    1.OutOfMemoryError:Java heap space 过程:服务器上面的mysql突然异常重启,导致了程序启动的时候报错 问题1:OutOfMemoryError:Java heap ...

  9. 内存溢出之Tomcat内存配置

    设置Tomcat启动的初始内存其初始空间(即-Xms)是物理内存的1/64,最大空间(-Xmx)是物理内存的1/4. 可以利用JVM提供的-Xmn -Xms -Xmx等选项可进行设置 三.实例,以下给 ...

随机推荐

  1. Access denied for user 'root'@'IP' (using password:YES)解决方法

    在MySql的使用过程中,碰到“Access denied for user 'root'@'IP' (using password:YES)”的问题,使用以下语句修改后还是不行. GRANT ALL ...

  2. L1-028. 判断素数

    本题的目标很简单,就是判断一个给定的正整数是否素数. 输入格式: 输入在第一行给出一个正整数N(<=10),随后N行,每行给出一个小于231的需要判断的正整数. 输出格式: 对每个需要判断的正整 ...

  3. JavaScript数据类型-2---Undefined、 Null、 Boolean、 Number、 String.

    学习目标 1.掌握JavaScript的数据类型 2.掌握typeof操作符 3.掌握Undefined 4.掌握null JavaScript的数据类型 ECMAScript中有5种简单数据类型(也 ...

  4. scala quick check

    Scala 特性   面向对象特性 函数式编程 Scala也是一种函数式语言,其函数也能当成值来使用.Scala提供了轻量级的语法用以定义匿名函数,支持高阶函数,允许嵌套多层函数,并支持柯里化.Sca ...

  5. Project篇:项目1

    项目: 步骤: (1)布置项目 (2)独立完成项目设计 (3)项目框架讲解 (4)独立完成项目功能编写 (5)项目讲解 项目内容介绍: 项目开发流程: 需求分析------>概要设计------ ...

  6. flask中利用from来进行对修改修改时旧密码的验证

    在flask中,肯定是post提交个from进行密码验证.还有一定就是修改密码肯定是登录之后才能进行对密码的修改,这么说,在浏览器中的session中一定会有用户的信息,可以通过相对应的信息去获取到相 ...

  7. Linux 服务器配置、运行、不用敲命令(新手必备!) - 宝塔全攻略建站一条龙

    Linux 服务器配置.运行.不用敲命令 WordPress 建站攻略 本文提供全流程,中文翻译. Chinar 坚持将简单的生活方式,带给世人!(拥有更好的阅读体验 -- 高分辨率用户请根据需求调整 ...

  8. background-position 的设置

    不应该按移动端的实际宽度或高度设置,应该按切出来图片的宽度设置,比如精灵图中有两个图片,各宽500px,那position应该设置为500px 0:而不是250px 0

  9. 在windows 上的RedisClient 上连接远程linux redis ("jave.net.ConnectException: Connection refused:connect")

    1.把防火墙禁用掉 2.redis.conf配置文件,注释掉bind 127.0.0.1 3.重启redis服务

  10. java-方法重写和方法重载的区别

    1.方法重载: - 英文:Overload - 可以改变返回值类型,只看参数列表. - 本类中出现的方法名一样,参数列表不同的方法,与返回值类型无关. 2.方法重写: - 英文:Override - ...