全球主机交流论坛

标题: 求助BT大神,数据库老是自动停止 [打印本页]

作者: 多多打折    时间: 2020-6-15 21:49
标题: 求助BT大神,数据库老是自动停止
BT 7.2免费版,数据库每隔一两天就自动停止,每次手动重启,疯了。。。

主机 2H2G

InnoDB_buffer_pool_size 默认就128,试过64,试过768,还是一样停止。。。

日志:

  1. 200615 00:37:42 mysqld_safe Number of processes running now: 0
  2. 200615 00:37:42 mysqld_safe mysqld restarted
  3. 2020-06-15  0:37:43 47904597051392 [Warning] option 'max_allowed_packet': unsigned value 107374182400 adjusted to 1073741824
  4. 2020-06-15  0:37:43 47904597051392 [Note] /www/server/mysql/bin/mysqld (mysqld 10.1.45-MariaDB) starting as process 5419 ...
  5. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Using mutexes to ref count buffer pool pages
  6. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: The InnoDB memory heap is disabled
  7. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
  8. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
  9. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Compressed tables use zlib 1.2.7
  10. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Using Linux native AIO
  11. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Using SSE crc32 instructions
  12. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Initializing buffer pool, size = 768.0M
  13. InnoDB: mmap(843448320 bytes) failed; errno 12
  14. 2020-06-15  0:37:43 47904597051392 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
  15. 2020-06-15  0:37:43 47904597051392 [ERROR] Plugin 'InnoDB' init function returned error.
  16. 2020-06-15  0:37:43 47904597051392 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
  17. 2020-06-15  0:37:43 47904597051392 [Note] Plugin 'FEEDBACK' is disabled.
  18. 2020-06-15  0:37:43 47904597051392 [ERROR] Unknown/unsupported storage engine: InnoDB
  19. 2020-06-15  0:37:43 47904597051392 [ERROR] Aborting
复制代码

作者: yifast07    时间: 2020-6-15 21:56
服务器的问题吧   你去bt论坛去问问
作者: xiaozhenghi    时间: 2020-6-15 23:24
我写了个脚本,每三分钟监测一下mysql的活动性,死了就启动下
作者: inkedus    时间: 2020-6-15 23:26
xiaozhenghi 发表于 2020-6-15 23:24
我写了个脚本,每三分钟监测一下mysql的活动性,死了就启动下

牛逼啊,分享出来给mjj们玩玩吧
作者: shc    时间: 2020-6-15 23:27
本帖最后由 shc 于 2020-6-15 23:29 编辑

MySQL经常挂大概率是内存不够

  1. 2020-06-15  0:37:43 47904597051392 [Note] InnoDB: Initializing buffer pool, size = 768.0M
  2. InnoDB: mmap(843448320 bytes) failed; errno 12
  3. 2020-06-15  0:37:43 47904597051392 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
复制代码


768M太大了,系统没有那么多内存分配出来
作者: xiaozhenghi    时间: 2020-6-15 23:28
  1. pgrep -x mysqld &> /dev/null
  2. if [ $? -ne 0 ];then
  3.         bash /www/server/panel/script/rememory.sh
  4.         /etc/init.d/mysqld start
  5. fi
复制代码


任务计划,shell脚本,间隔三分钟,三分钟监测一下,挂了就重启下mysql,反正前端是cdn,三分钟也看不出来死了没就过去了
作者: 你好,再见    时间: 2020-6-15 23:28
把Nginx的处理进程调少点试试,不要Auto
作者: hdwz88    时间: 2020-6-15 23:32
重装基本能解决全部问题 估计是你LINUX系统版本缺少组件
作者: 嗷嗷    时间: 2020-6-15 23:34
可能是内存问题 ⁢⁢⁢⁢⁢
作者: 1767196823    时间: 2020-6-15 23:48
内存不够,,,我之前用的那种超开ovz,,,1H2G  安装数据库,,时不时就停止

换了其他商家就好了,,,,多半是服务器内存问题,,肯定超开严重
作者: latiao88    时间: 2020-6-16 00:47
内存不够,要加内存
作者: lllll    时间: 2020-6-16 01:00
pgrep -x mysqld &> /dev/null
if [ $? -ne 0 ];then
        bash /www/server/panel/script/rememory.sh   
        /etc/init.d/mysqld start      
fi


设置60分钟运行一次




欢迎光临 全球主机交流论坛 (https://mjj.022333.xyz/) Powered by Discuz! X3.4