MySQL runs fine for weeks or days, and then suddenly and without any user action, all attempts to connect begin failing. This is /var/log/mysqld.log
:
160916 14:42:01 [Note] /usr/libexec/mysql55/mysqld: ready for connections.
Version: '5.5.51' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL)
160930 03:05:51 mysqld_safe Number of processes running now: 0
160930 03:05:52 mysqld_safe mysqld restarted
160930 3:05:53 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.51) starting as process 8961 ...
160930 3:05:53 [Note] Plugin 'FEDERATED' is disabled.
160930 3:05:54 InnoDB: The InnoDB memory heap is disabled
160930 3:05:54 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160930 3:05:54 InnoDB: Compressed tables use zlib 1.2.8
160930 3:05:54 InnoDB: Using Linux native AIO
160930 3:05:54 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160930 3:05:54 InnoDB: Completed initialization of buffer pool
160930 3:05:54 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160930 3:05:54 [ERROR] Plugin 'InnoDB' init function returned error.
160930 3:05:54 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160930 3:05:54 [ERROR] Unknown/unsupported storage engine: InnoDB
160930 3:05:54 [ERROR] Aborting
160930 3:05:54 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete
160930 03:05:54 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
What causes this, and how can I deal with it?