"systemctl status mariadb.service" and "journalctl -xe" for details

今天php 在做swoole 时启动一个进程
正运行着哪突然所有接口都没了反应
进入服务查看发现 nginx mysql 都停止运行了

在启动mysql 时出现

Job for mariadb.service failed because the control process exited with error code. 
See "systemctl status mariadb.service" and "journalctl -xe" for details.

查找步骤

1.进入 mysql 日志文件
less /var/log/mariadb/mariadb.log 

找到错误日志
190917 11:39:44 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
190917 11:40:30 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190917 11:40:30 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 29084 ...
190917 11:40:30 [ERROR] mysqld: Out of memory (Needed 128917504 bytes)
190917 11:40:30 [ERROR] mysqld: Out of memory (Needed 96681984 bytes)
190917 11:40:30 [ERROR] mysqld: Out of memory (Needed 72499200 bytes)
190917 11:40:30 InnoDB: The InnoDB memory heap is disabled
190917 11:40:30 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190917 11:40:30 InnoDB: Compressed tables use zlib 1.2.7
190917 11:40:30 InnoDB: Using Linux native AIO
190917 11:40:30 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137756672 bytes) failed; errno 12
190917 11:40:30 InnoDB: Completed initialization of buffer pool
190917 11:40:30 InnoDB: Fatal error: cannot allocate memory for the buffer pool
190917 11:40:30 [ERROR] Plugin 'InnoDB' init function returned error.
190917 11:40:30 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
190917 11:40:30 [Note] Plugin 'FEEDBACK' is disabled.
190917 11:40:30 [ERROR] Unknown/unsupported storage engine: InnoDB
190917 11:40:30 [ERROR] Aborting
大概意思是:致命错误,超出内存,已经分配allocated 262144,尝试分配19456 字节。

2.经过网上查找最终解决方案
修改php.ini
	max_execution_time = 120 ;每个脚本的最长执行时间(秒)
	max_input_time = 60 ; 每个脚本解析请求数据的最长时间
	memory_limit = 64M ;最大存储量一个脚本可能消耗
3.重启php mysql 
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Spicy姜

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值