[MYSQL5.5.0] ERROR: cannot allocate the memory for the buffer pool
突然间,机器上的Mysql不能启动了,查看日志发现,INNODB报这样错误:
090819 10:45:09 InnoDB: Error: cannot allocate 2147500032 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 35493848 bytes. Operating system errno: 12
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: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
090819 10:46:09 [ERROR] Plugin 'InnoDB' init function returned error.
090819 10:46:09 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
090819 10:46:09 [Note] /usr/local/webserver/mysql/libexec/mysqld: Normal shutdown
090819 10:46:09 [Warning] 'user' entry 'root@zhangyufeng' ignored in --skip-name-resolve mode.
090819 10:46:09 [Warning] 'user' entry '@zhangyufeng' ignored in --skip-name-resolve mode.
090819 10:46:09 [Note] Event Scheduler: Loaded 0 events
090819 10:46:09 [Note] /usr/local/webserver/mysql/libexec/mysqld: ready for connections.
Version: '5.1.32-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
090819 10:46:09 [Note] Event Scheduler: Purging the queue. 0 events
090819 10:46:09 [Note] /usr/local/webserver/mysql/libexec/mysqld: Shutdown complete
我一开始以为是innoDB的扩展坏掉了,于是重新编译安装了mysql,后来才发现,原来是配置文件中
innodb_buffer_pool_size 设置的值过大了,(我设置了2048M) 呵呵 ,缓冲池过大了,原来没有
出错是因为我没开大的应用,我机器内存是4G,现在跑了个虚拟机后,内存剩余就不足了。
090819 10:45:09 InnoDB: Error: cannot allocate 2147500032 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 35493848 bytes. Operating system errno: 12
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: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds
InnoDB: Fatal error: cannot allocate the memory for the buffer pool
090819 10:46:09 [ERROR] Plugin 'InnoDB' init function returned error.
090819 10:46:09 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
090819 10:46:09 [Note] /usr/local/webserver/mysql/libexec/mysqld: Normal shutdown
090819 10:46:09 [Warning] 'user' entry 'root@zhangyufeng' ignored in --skip-name-resolve mode.
090819 10:46:09 [Warning] 'user' entry '@zhangyufeng' ignored in --skip-name-resolve mode.
090819 10:46:09 [Note] Event Scheduler: Loaded 0 events
090819 10:46:09 [Note] /usr/local/webserver/mysql/libexec/mysqld: ready for connections.
Version: '5.1.32-log' socket: '/tmp/mysql.sock' port: 3306 Source distribution
090819 10:46:09 [Note] Event Scheduler: Purging the queue. 0 events
090819 10:46:09 [Note] /usr/local/webserver/mysql/libexec/mysqld: Shutdown complete
我一开始以为是innoDB的扩展坏掉了,于是重新编译安装了mysql,后来才发现,原来是配置文件中
innodb_buffer_pool_size 设置的值过大了,(我设置了2048M) 呵呵 ,缓冲池过大了,原来没有
出错是因为我没开大的应用,我机器内存是4G,现在跑了个虚拟机后,内存剩余就不足了。
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/2631/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
评论列表