Почему падает mysql и поднять помогает только ребут, иначе daemon failed?

CentOS. VestaCP. Падает mysql и его не рестартануть (service mysqld restart), пишет daemon failed.

140601 18:09:38 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140601 18:09:38 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140601 18:09:38 [Note] Plugin 'FEDERATED' is disabled.
140601 18:09:38 InnoDB: The InnoDB memory heap is disabled
140601 18:09:38 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140601 18:09:38 InnoDB: Compressed tables use zlib 1.2.3
140601 18:09:38 InnoDB: Using Linux native AIO
140601 18:09:38 InnoDB: Initializing buffer pool, size = 128.0M
140601 18:09:38 InnoDB: Completed initialization of buffer pool
140601 18:09:38 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140601 18:09:38  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140601 18:09:38  InnoDB: Waiting for the background threads to start
140601 18:09:39 InnoDB: 5.5.37 started; log sequence number 3023145
140601 18:09:39 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140601 18:09:39 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140601 18:09:39 [Note] Server socket created on IP: '0.0.0.0'.
140601 18:09:39 [Warning] 'proxies_priv' entry '@ root@myserver' ignored in --skip-name-resolve mode.
140601 18:09:39 [Note] Event Scheduler: Loaded 0 events
140601 18:09:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.37'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
140603 07:01:01 mysqld_safe Number of processes running now: 0
140603 07:01:01 mysqld_safe mysqld restarted
140603  7:01:01 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140603  7:01:01 [Note] Plugin 'FEDERATED' is disabled.
140603  7:01:01 InnoDB: The InnoDB memory heap is disabled
140603  7:01:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140603  7:01:01 InnoDB: Compressed tables use zlib 1.2.3
140603  7:01:01 InnoDB: Using Linux native AIO
140603  7:01:01 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
140603  7:01:01 InnoDB: Completed initialization of buffer pool
140603  7:01:01 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140603  7:01:01 [ERROR] Plugin 'InnoDB' init function returned error.
140603  7:01:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140603  7:01:01 [ERROR] Unknown/unsupported storage engine: InnoDB
140603  7:01:01 [ERROR] Aborting

140603  7:01:01 [Note] /usr/libexec/mysqld: Shutdown complete

140603 07:01:01 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

<b>ЗДЕСЬ ВИДИМО РЕБУТНУЛ СЕРВЕР</b>

140603 11:10:47 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140603 11:10:47 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140603 11:10:47 [Note] Plugin 'FEDERATED' is disabled.
140603 11:10:47 InnoDB: The InnoDB memory heap is disabled
140603 11:10:47 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140603 11:10:47 InnoDB: Compressed tables use zlib 1.2.3
140603 11:10:47 InnoDB: Using Linux native AIO
140603 11:10:47 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(135987200 bytes) failed; errno 12
140603 11:10:47 InnoDB: Completed initialization of buffer pool
140603 11:10:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140603 11:10:47 [ERROR] Plugin 'InnoDB' init function returned error.
140603 11:10:47 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140603 11:10:47 [ERROR] Unknown/unsupported storage engine: InnoDB
140603 11:10:47 [ERROR] Aborting

140603 11:10:47 [Note] /usr/libexec/mysqld: Shutdown complete

140603 11:10:47 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
140603 11:11:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140603 11:11:21 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140603 11:11:21 [Note] Plugin 'FEDERATED' is disabled.
140603 11:11:21 InnoDB: The InnoDB memory heap is disabled
140603 11:11:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140603 11:11:21 InnoDB: Compressed tables use zlib 1.2.3
140603 11:11:21 InnoDB: Using Linux native AIO
140603 11:11:21 InnoDB: Initializing buffer pool, size = 128.0M
140603 11:11:21 InnoDB: Completed initialization of buffer pool
140603 11:11:21 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
140603 11:11:21  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
140603 11:11:22  InnoDB: Waiting for the background threads to start
140603 11:11:23 InnoDB: 5.5.37 started; log sequence number 3023155
140603 11:11:23 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140603 11:11:23 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140603 11:11:23 [Note] Server socket created on IP: '0.0.0.0'.
140603 11:11:23 [Warning] 'proxies_priv' entry '@ root@myserver' ignored in --skip-name-resolve mode.
140603 11:11:23 [Note] Event Scheduler: Loaded 0 events
140603 11:11:23 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.37'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
  • Вопрос задан
  • 5652 просмотра
Пригласить эксперта
Ответы на вопрос 3
Памяти свободной не хватает.
140603 11:10:47 InnoDB: Fatal error: cannot allocate memory for the buffer pool
Ответ написан
Комментировать
Rpsl
@Rpsl
Кратко о себе
140603 7:01:01 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140603 7:01:01 [ERROR] Plugin 'InnoDB' init function returned error.
140603 7:01:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140603 7:01:01 [ERROR] Unknown/unsupported storage engine: InnoDB
140603 7:01:01 [ERROR] Aborting


Дальше разберетесь?
Ответ написан
Комментировать
Shing
@Shing Автор вопроса
Огромное спасибо, я плохо разбираюсь, сейчас буду читать на тему.
Странно, у меня там несколько блогов на вордпрессе, трафика может пару сотен уников в сутки максимум.

free -m
498 памяти 405 занято 92 свободно.

My.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-name-resolve
user=mysql
symbolic-links=0
max_connections=70
max_user_connections=30
wait_timeout=10
interactive_timeout=50
long_query_time=5
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log

key_buffer = 16M
myisam_sort_buffer_size = 32M
join_buffer_size=1M
read_buffer_size=1M
sort_buffer_size=2M
table_cache=1024
thread_cache_size=286
interactive_timeout=25
connect_timeout=5
max_allowed_packet=1M
max_connect_errors=1000
query_cache_limit=1M
query_cache_size=8M
query_cache_type=1
tmp_table_size=16M

#innodb_use_native_aio = 0
innodb_file_per_table

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


добавлял тут только skip-name-resolve, так как было много странных обращений, читал, что долбят мускул с разных китайских ip, тем самым создавая нагрузку.

Из рекомендаций что нашел:
Выставить какое-то значение innodb_buffer_pool_size
Еще эту настройку performance_schema=off
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы