Servicio MySQL se para en servidor Ubuntu
1.610 views
Ya me he encontrado varias veces con que el servidor mysql de mi VPS está parado, y lo tengo que iniciar manualmente con:
$ service mysql start
He comprobado los logs en /var/log/mysql/error.log y veo las líneas:
130905 10:38:56 InnoDB: Initializing buffer pool, size = 128.0M InnoDB: mmap(137363456 bytes) failed; errno 12 130905 10:38:56 InnoDB: Completed initialization of buffer pool 130905 10:38:56 InnoDB: Fatal error: cannot allocate memory for the buffer pool 130905 10:38:56 [ERROR] Plugin 'InnoDB' init function returned error. 130905 10:38:56 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 130905 10:38:56 [ERROR] Unknown/unsupported storage engine: InnoDB 130905 10:38:56 [ERROR] Aborting 130905 10:38:56 [Note] /usr/sbin/mysqld: Shutdown complete
Así que, para ver si se soluciona, añado la línea siguiente al archivo /etc/mysql/my.cnf:
innodb_buffer_pool_size = 50M
en la sección [mysqld]
Lo dejaremos unos días, a ver si se sigue parando.