Chinaunix首页 | 论坛 | 博客
  • 博客访问: 694121
  • 博文数量: 143
  • 博客积分: 1554
  • 博客等级: 上尉
  • 技术积分: 1767
  • 用 户 组: 普通用户
  • 注册时间: 2011-04-10 11:50
文章分类

全部博文(143)

文章存档

2017年(2)

2016年(5)

2015年(16)

2014年(25)

2013年(27)

2012年(16)

2011年(52)

分类: Mysql/postgreSQL

2011-08-22 15:14:36

Mysql意外关闭导致网页报错

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

登录上服务器发现mysql已关闭,重启mysqld服务失败

查看mysql日志,如下


110822 13:02:34 mysqld_safe Starting mysqld daemon with databases from /var/data/mysql

110822 13:02:34 [Warning] The syntax '--skip-locking' is deprecated and will be removed in a future release. Pleas                            e use --skip-external-locking instead.

110822 13:02:34 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in a future release. P                            lease use '--slow_query_log'/'--slow_query_log_file' instead.

110822 13:02:34 [Warning] The syntax '--default-character-set' is deprecated and will be removed in a future relea                            se. Please use --character-set-server instead.

110822 13:02:34 [Warning] option 'innodb-file-io-threads': signed value 2 adjusted to 4

110822 13:02:34  InnoDB: Error: cannot allocate 268451840 bytes of

InnoDB: memory with malloc! Total allocated memory

InnoDB: by InnoDB 5203168 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

110822 13:03:34 [ERROR] Plugin 'InnoDB' init function returned error.

110822 13:03:34 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

110822 13:03:34 [ERROR] Unknown/unsupported table type: InnoDB

110822 13:03:34 [ERROR] Aborting


110822 13:03:34 [Note] /opt/app/mysql/libexec/mysqld: Shutdown complete


分析:从错误日志上可以看出是属于memory问题
解决办法:修个配置文件mysql.cnf中的innodb_buffer_pool_size = 128M (原来是256M)
                    很多人都会想到InnoDB的原因所导致的,其实不然。
重启mysql成功


阅读(3732) | 评论(0) | 转发(0) |
0

上一篇:Mysql同步报错

下一篇:mysql_slave同步Fix问题

给主人留下些什么吧!~~