V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
isphone
V2EX  ›  问与答

mysql 运行一段时间就自动停止了,请教一下大家

  •  
  •   isphone · Jan 23, 2017 · 3770 views
    This topic created in 3395 days ago, the information mentioned may be changed or developed.

    2017-01-22 22:37:22 0 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.6.29) starting as process 2097 ...
    2017-01-22 22:37:22 2097 [Note] Plugin 'FEDERATED' is disabled.
    2017-01-22 22:37:22 2097 [Note] InnoDB: Using atomics to ref count buffer pool pages
    2017-01-22 22:37:22 2097 [Note] InnoDB: The InnoDB memory heap is disabled
    2017-01-22 22:37:22 2097 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
    2017-01-22 22:37:22 2097 [Note] InnoDB: Memory barrier is not used
    2017-01-22 22:37:22 2097 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2017-01-22 22:37:22 2097 [Note] InnoDB: Using CPU crc32 instructions
    2017-01-22 22:37:22 2097 [Note] InnoDB: Initializing buffer pool, size = 128.0M
    InnoDB: mmap(137363456 bytes) failed; errno 12
    2017-01-22 22:37:22 2097 [ERROR] InnoDB: Cannot allocate memory for the buffer pool
    2017-01-22 22:37:22 2097 [ERROR] Plugin 'InnoDB' init function returned error.
    2017-01-22 22:37:22 2097 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    2017-01-22 22:37:22 2097 [ERROR] Unknown/unsupported storage engine: InnoDB
    2017-01-22 22:37:22 2097 [ERROR] Aborting

    2017-01-22 22:37:22 2097 [Note] Binlog end
    上面是日志,请教是什么原因?谢谢

    7 replies    2017-01-23 08:59:32 +08:00
    gamesbain
        1
    gamesbain  
       Jan 23, 2017 via iPhone
    应该是内存不够,我也遇到过同样的问题
    jarlyyn
        2
    jarlyyn  
       Jan 23, 2017
    google 搜 InnoDB: mmap(137363456 bytes) failed; errno 12 第一条。
    isphone
        3
    isphone  
    OP
       Jan 23, 2017
    @gamesbain 内存好像够哦,没有提示说内存不够
    jarlyyn
        4
    jarlyyn  
       Jan 23, 2017
    @isphone

    InnoDB: Cannot allocate memory for the buffer pool
    xiuc001
        5
    xiuc001  
       Jan 23, 2017 via iPhone
    内存不够吧
    cyr1l
        6
    cyr1l  
       Jan 23, 2017 via iPhone
    有可能是某些目录的权限问题,用 sudo 运行试试?
    Infernalzero
        7
    Infernalzero  
       Jan 23, 2017
    方案 1 :系统加内存
    方案 2 :配置文件里 InnoDB buffer pool size 改小
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3750 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 85ms · UTC 10:38 · PVG 18:38 · LAX 03:38 · JFK 06:38
    ♥ Do have faith in what you're doing.