Tareas #5405

Crash de Mysql en DaVinci

Added by Daniel Viñar Ulriksen over 4 years ago. Updated about 4 years ago.

Status:CerradaStart date:06/20/2016
Priority:NormalDue date:
Assignee:Leroy Deniz% Done:

100%

Category:-Spent time:2.00 hours
Target version:-

Description

Hoy el servidor mysql de davinci amaneció caído.

service mysql restart

no funciona. Aparece en los /var/log/syslog:

Jun 20 06:27:40 davinci mysqld: 160620  6:27:40 [ERROR] Error in accept: Too many open files

Mirando, hay errores mysql desde hace algunos días.

History

#1 Updated by Daniel Viñar Ulriksen over 4 years ago

  • Status changed from Nueva to En curso
  • Estimated time set to 1.00

Luego de un reboot, aparecen muchas veces mensajes :

Jun 20 10:59:41 davinci mysqld: 160620 10:59:41  InnoDB: Error: page 49152 log sequence number 161867510522
Jun 20 10:59:41 davinci mysqld: InnoDB: is in the future! Current system log sequence number 161867063080.
Jun 20 10:59:41 davinci mysqld: InnoDB: Your database may be corrupt or you may have copied the InnoDB
Jun 20 10:59:41 davinci mysqld: InnoDB: tablespace but not the InnoDB log files. See
Jun 20 10:59:41 davinci mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
Jun 20 10:59:41 davinci mysqld: InnoDB: for more information.

#2 Updated by Daniel Viñar Ulriksen over 4 years ago

Como recomienda laa documenación citada en el log, probamos agregar al /etc/mysql/my.ncf un:

innodb_force_recovery = 1

Entonces reiniciamos mysql; arranca, pero da nuevos errores:

Jun 20 11:16:21 davinci mysqld: InnoDB: A new raw disk partition was initialized or
Jun 20 11:16:21 davinci mysqld: InnoDB: innodb_force_recovery is on: we do not allow
Jun 20 11:16:21 davinci mysqld: InnoDB: database modifications by the user. Shut down
Jun 20 11:16:21 davinci mysqld: InnoDB: mysqld and edit my.cnf so that newraw is replaced
Jun 20 11:16:21 davinci mysqld: InnoDB: with raw, and innodb_force_... is removed.

#3 Updated by Daniel Viñar Ulriksen over 4 years ago

  • % Done changed from 0 to 20

Ahora el error recurrente también es:

Jun 20 11:16:48 davinci mysqld: 160620 11:16:48 [ERROR] Cannot find or open table ccdt_consulta/accesslog from
Jun 20 11:16:48 davinci mysqld: the internal data dictionary of InnoDB though the .frm file for the
Jun 20 11:16:48 davinci mysqld: table exists. Maybe you have deleted and recreated InnoDB data
Jun 20 11:16:48 davinci mysqld: files but have forgotten to delete the corresponding .frm files
Jun 20 11:16:48 davinci mysqld: of InnoDB tables, or you have moved .frm files to another database?
Jun 20 11:16:48 davinci mysqld: or, the table contains indexes that this version of the engine
Jun 20 11:16:48 davinci mysqld: doesn't support.
Jun 20 11:16:48 davinci mysqld: See http://dev.mysql.com/doc/refman/5.5/en/innodb-troubleshooting.html
Jun 20 11:16:48 davinci mysqld: how you can resolve the problem.

Miramos la documentación, que nos sugiere retirar el:

innodb_force_recovery = 1

#4 Updated by Daniel Viñar Ulriksen over 4 years ago

  • Status changed from En curso to Resuelta
  • Assignee changed from Daniel Viñar Ulriksen to Leroy Deniz
  • % Done changed from 20 to 60

Subsisten varios de estos últimos errores, pero todos sobre la base ccdt_consulta (que es una base vacía).

Pero ahora mysql arranca y las otras bases y sitios están andando.

#5 Updated by Daniel Viñar Ulriksen over 4 years ago

Perdón, también, entre algunos de los pasos reportados aquí, agregué en /etc/security/limits.conf las siguientes líneas:

mysql  soft  nofile  49152
mysql  hard  nofile  65536

#6 Updated by Daniel Viñar Ulriksen over 4 years ago

  • Estimated time deleted (1.00)

#7 Updated by Daniel Viñar Ulriksen over 4 years ago

borramos la base ccdt_consulta que está vacía, y ya no da los errores.

#8 Updated by Leroy Deniz about 4 years ago

  • Status changed from Resuelta to Cerrada
  • % Done changed from 60 to 100

Also available in: Atom PDF