如题,刚建的站点,基本没人访问时,每隔1,2天就出现Error establishing a database connection,人稍微多点过一会也会出现Error establishing a database connection,麻烦大神指点什么原因。
数据库的错误日志
171115 14:14:30 mysqld_safe Number of processes running now: 0
171115 14:14:30 mysqld_safe mysqld restarted
171115 14:14:31 [Note] Plugin 'FEDERATED' is disabled.
171115 14:14:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
171115 14:14:31 InnoDB: Compressed tables use zlib 1.2.3
171115 14:14:31 InnoDB: Using Linux native AIO
171115 14:14:31 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
171115 14:14:31 InnoDB: Completed initialization of buffer pool
171115 14:14:31 InnoDB: Fatal error: cannot allocate memory for the buffer pool
171115 14:14:31 [ERROR] Plugin 'InnoDB' init function returned error.
171115 14:14:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
171115 14:14:31 [ERROR] Unknown/unsupported storage engine: InnoDB
171115 14:14:31 [ERROR] Aborting
已经调大了my.cnf中的
key_buffer_size = 400M
#innodb_buffer_pool_size = 400M
(服务器内存1G)
但是还是出现同样的问题。
详细的错误提示如下
Warning: mysqli_real_connect(): (HY000/2002): No such file or directory in /alidata/www/phpwind/wp-includes/wp-db.php on line 1548
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /alidata/www/phpwind/wp-includes/wp-db.php on line 1578
Warning: mysql_connect(): No such file or directory in /alidata/www/phpwind/wp-includes/wp-db.php on line 1578
查看wp-db.php文件相应内容如文末
麻烦大神指点问题出现在哪?
-------------------------
-------------------------
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。