我有一个非常奇怪的问题,我有一个运行mod_wsgi的Apache服务器.该网站运行良好,但每隔一段时间我就得到了
IOError: failed to write data
网站的所有页面上的错误.然后我解决了
sudo service mysqld restart
由于网站不能长时间停机,我没有时间调试这个问题,我只是每次都发生这个命令.我只看到日志中的错误,这就是为什么我无法真正调试它,它没有明确的复制步骤,它只是随机发生.
任何帮助将不胜感激,如果您需要我发布任何配置文件,请告诉我.
编辑:django显示的确切错误是:
(2002,"Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")
我保存了错误消息,它托管了here.(密码已删除)
编辑:
这是mysql服务器错误日志的摘录.
160610 10:51:53 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
160610 10:51:53 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 7658 ...
160617 14:35:47 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 32054 ...
160617 14:35:47 [Note] Plugin 'FEDERATED' is disabled.
160617 14:35:47 InnoDB: The InnoDB memory heap is disabled
160617 14:35:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160617 14:35:47 InnoDB: Compressed tables use zlib 1.2.8
160617 14:35:47 InnoDB: Using Linux native AIO
160617 14:35:47 InnoDB: Initializing buffer pool,size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160617 14:35:47 InnoDB: Completed initialization of buffer pool
160617 14:35:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160617 14:35:47 [ERROR] Plugin 'InnoDB' init function returned error.
160617 14:35:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160617 14:35:47 [ERROR] Unknown/unsupported storage engine: InnoDB
160617 14:35:47 [ERROR] Aborting
我保存了完整的mysqld.log here.