MySQL 内存溢出
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,不崩溃才怪咧。。。
- InnoDB: Fatal error: cannot allocate 196608 bytes of
- InnoDB: memory with malloc! Total allocated memory
- InnoDB: by InnoDB 2307421120 bytes. Operating system errno: 12
- InnoDB: Cannot continue operation!
- InnoDB: Check if you should increase the swap file or
- InnoDB: ulimits of your operating system.
- InnoDB: On FreeBSD check you have compiled the OS with
- InnoDB: a big enough maximum process size.
- InnoDB: We now intentionally generate a seg fault so that
- InnoDB: on Linux we get a stack trace.
- mysqld got signal 11;
- This could be because you hit a bug. It is also possible that this binary
- or one of the libraries it was linked against is corrupt, improperly built,
- or misconfigured. This error can also be caused by malfunctioning hardware.
- We will try our best to scrape up some info that will hopefully help diagnose
- the problem, but since we have already crashed, something is definitely wrong
- and this may fail.
- key_buffer_size=402653184
- read_buffer_size=2093056
- max_used_connections=167
- max_connections=600
- threads_connected=167
- It is possible that mysqld could use up to
- key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 2340507 K
- bytes of memory
- Hope that's ok; if not, decrease some variables in the equation.
- thd=(nil)
- Attempting backtrace. You can use the following information to find out
- where mysqld died. If you see no messages after this, something went
- terribly wrong...
- Cannot determine thread, fp=0x2d2aae98, backtrace may not be correct.
- Stack range sanity check OK, backtrace follows:
- 0x8101ff5
- 0x996420
- (nil)
- 0x82a0986
- 0x82648ac
- 0x81a2249
- 0x67949b
- 0x5f942e
- New value of fp=(nil) failed sanity check, terminating stack trace!
- Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
- stack trace is much more helpful in diagnosing the problem, so please do
- resolve it
- The manual page at http://www.mysql.com/doc/en/Crashing.html contains
- information that should help you find out what is causing the crash.
- Number of processes running now: 0
- 120419 16:42:05 mysqld restarted
- 120419 16:42:05 InnoDB: Database was not shut down normally.
- InnoDB: Starting recovery from log files...
- InnoDB: Starting log scan based on checkpoint at
- InnoDB: log sequence number 2391 788299922
- InnoDB: Doing recovery: scanned up to log sequence number 2391 793542656
- InnoDB: Doing recovery: scanned up to log sequence number 2391 798785536
- InnoDB: Doing recovery: scanned up to log sequence number 2391 804028416
- InnoDB: Doing recovery: scanned up to log sequence number 2391 809271296
- InnoDB: Doing recovery: scanned up to log sequence number 2391 814514176
- InnoDB: Doing recovery: scanned up to log sequence number 2391 819757056
- InnoDB: Doing recovery: scanned up to log sequence number 2391 824999936
- InnoDB: Doing recovery: scanned up to log sequence number 2391 830242816
- InnoDB: Doing recovery: scanned up to log sequence number 2391 835485696
- InnoDB: Doing recovery: scanned up to log sequence number 2391 840728576
- InnoDB: Doing recovery: scanned up to log sequence number 2391 845971456
- InnoDB: Doing recovery: scanned up to log sequence number 2391 851214336
- InnoDB: Doing recovery: scanned up to log sequence number 2391 856457216
- InnoDB: Doing recovery: scanned up to log sequence number 2391 861700096
- InnoDB: Doing recovery: scanned up to log sequence number 2391 866942976
- InnoDB: Doing recovery: scanned up to log sequence number 2391 872185856
- InnoDB: Doing recovery: scanned up to log sequence number 2391 877428736
- InnoDB: Doing recovery: scanned up to log sequence number 2391 882671616
- InnoDB: Doing recovery: scanned up to log sequence number 2391 887914496
- InnoDB: Doing recovery: scanned up to log sequence number 2391 893157376
- InnoDB: Doing recovery: scanned up to log sequence number 2391 898400256
- InnoDB: Doing recovery: scanned up to log sequence number 2391 903643136
- InnoDB: Doing recovery: scanned up to log sequence number 2391 908886016
- InnoDB: Doing recovery: scanned up to log sequence number 2391 914128896
- InnoDB: Doing recovery: scanned up to log sequence number 2391 919371776
- InnoDB: Doing recovery: scanned up to log sequence number 2391 924614656
- InnoDB: Doing recovery: scanned up to log sequence number 2391 929389979
- 120419 16:42:08 InnoDB: Starting an apply batch of log records to the database...
- 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
- InnoDB: Apply batch completed
- InnoDB: Last MySQL binlog file position 0 248513413, file name /data/mysqlbinlog/mysql-bin.1554
- 120419 16:43:23 InnoDB: Flushing modified pages from the buffer pool...
- 120419 16:43:59 InnoDB: Started
- /usr/local/mysql/libexec/mysqld: ready for connections.
- Version: '4.0.26-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
MySQL 内存溢出的更多相关文章
- Solr Dataimporthandler 导入MySQL 内存溢出。
最近准备把一千九百多万数据导入Solr中,在以前测试数据只有一两百万,全量导入没有任务问题.但是,换成一千九百万数据时,solr报内存异常(java.lang.OutOfMemoryError:GC ...
- tomcat mysql 内存溢出的问题
原因是mysql的密码有问题 解决办法: 具体操作步骤: 关闭 mysql: # service mysqld stop 然后: # mysqld_safe --skip-grant-tables 启 ...
- [转]solr DataImportHandler 解决mysql 表导入内存溢出问题
最近一个项目要用到solr做全文检索,开始盲人摸象. 用tomcat 7 开始配置,开始正常,但是遇到cookie里有中文就报错. 无奈,换tomcat 6, 结果DataImportHandler ...
- php查询mysql返回大量数据结果集导致内存溢出的解决方法
web开发中如果遇到php查询mysql返回大量数据导致内存溢出.或者内存不够用的情况那就需要看下MySQL C API的关联,那么究竟是什么导致php查询mysql返回大量数据时内存不够用情况? 答 ...
- PDO之MySql持久化自动重连导致内存溢出
前言 最近项目需要一个常驻内存的脚本来执行队列程序,脚本完成后发现Mysql自动重连部分存在内存溢出,导致运行一段时间后,会超出PHP内存限制退出 排查 发现脚本存在内存溢出后排查了一遍代码,基本确认 ...
- 线上mysql内存持续增长直至内存溢出被killed分析(已解决)
来新公司前,领导就说了,线上生产环境Mysql库经常会发生日间内存爆掉被killed的情况,结果来到这第一天,第一件事就是要根据线上服务器配置优化配置,同时必须找出现在mysql内存持续增加爆掉的原因 ...
- tomcat内存溢出处理
tomcat内存溢出设置JAVA_OPTS 答案1设置Tomcat启动的初始内存 其初始空间(即-Xms)是物理内存的1/64,最大空间(-Xmx)是物理内存的1/4.可以利用JVM提供的-Xmn ...
- 游戏服java程序启动,显示内存溢出
1.OutOfMemoryError:Java heap space 过程:服务器上面的mysql突然异常重启,导致了程序启动的时候报错 问题1:OutOfMemoryError:Java heap ...
- 内存溢出之Tomcat内存配置
设置Tomcat启动的初始内存其初始空间(即-Xms)是物理内存的1/64,最大空间(-Xmx)是物理内存的1/4. 可以利用JVM提供的-Xmn -Xms -Xmx等选项可进行设置 三.实例,以下给 ...
随机推荐
- Python之路PythonThread,第三篇,进程3
python3 进程3 管道 在内存中开辟一个管道空间,对多个进程可见. 在通信形式上形成一种约束: linux 文件类型 b c d - ...
- 搜索入门_简单搜索bfs dfs大杂烩
dfs题大杂烩 棋盘问题 POJ - 1321 和经典的八皇后问题一样. 给你一个棋盘,只有#区域可以放棋子,同时同一行和同一列只能有一个棋子. 问你放k个棋子有多少种方案. 很明显,这是搜索题. ...
- Django中的session于cookie的用法
1.cookies 1.django 中使用 cookies 1.设置cookies的值(将数据保存到客户端) 语法: 响应对象.set_cookie(key,value,expires) key:c ...
- QT学习相关
1. vs2012的编译器对execution_character_set("utf-8")无反应的bug在vs2013中解决 2. 安装上vs2013后,重装的qt插件,发现不能 ...
- 20155219--pwd指令的简单实现
pwd指令的简单实现 pwd命令作用 Linux中用** pwd **命令来查看"当前工作目录"的完整路径. 简单得说,每当你在终端进行操作时,你都会有一个当前工作目录. 在不太确 ...
- iphone上点击div会出现半透明灰色背景以及margin失效
-webkit-tap-highlight-color 这个属性只用于iOS (iPhone和iPad).当你点击一个链接或者通过Javascript定义的可点击元素的时候,它就会出现 ...
- mvc core2.1 Identity.EntityFramework Core 导航状态栏(六)
之前做的无法 登录退出,和状态,加入主页导航栏 Views ->Shared->_Layout.cshtml <div class="navbar-collapse col ...
- Codeforces Div3 #501 A-E(2) F以后补
感觉自己有点强迫症 不都写出来就找理由不写题解 http://codeforces.com/contest/1015 题目链接 A. Points in Segments 题目意思 n个线段 ...
- 使用Maven插件启动tomcat服务
新建maven web项目,首先保证maven环境OK,maven项目能正常install1.pom.xml文件配置如下: <build> <pluginManagement> ...
- dup等复制文件描述符函数
[root@bogon code]# cat b.c #include<stdio.h> #include<error.h> #include<unistd.h> ...