I've a mysql server (v5.6) running on ubuntu server 10 x64. It's always up and running with a medium traffic, but every while it crashes & restarts without lefting any log message behind, after restarting, it begins crash recovery which usually takes about 10 minutes & mysql error.log
file resets & it looks like the following:
2017-07-27 10:07:37 23427 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2017-07-27 10:07:37 23427 [Note] Plugin 'FEDERATED' is disabled.
2017-07-27 10:07:37 23427 [Note] InnoDB: Using atomics to ref count buffer pool pages
2017-07-27 10:07:37 23427 [Note] InnoDB: The InnoDB memory heap is disabled
2017-07-27 10:07:37 23427 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-07-27 10:07:37 23427 [Note] InnoDB: Memory barrier is not used
2017-07-27 10:07:37 23427 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-07-27 10:07:37 23427 [Note] InnoDB: Using Linux native AIO
2017-07-27 10:07:37 23427 [Note] InnoDB: Not using CPU crc32 instructions
2017-07-27 10:07:37 23427 [Note] InnoDB: Initializing buffer pool, size = 5.0G
2017-07-27 10:07:38 23427 [Note] InnoDB: Completed initialization of buffer pool
2017-07-27 10:07:38 23427 [Note] InnoDB: Highest supported file format is Barracuda.
2017-07-27 10:07:38 23427 [Note] InnoDB: Log scan progressed past the checkpoint lsn 194934547118
2017-07-27 10:07:38 23427 [Note] InnoDB: Database was not shutdown normally!
2017-07-27 10:07:38 23427 [Note] InnoDB: Starting crash recovery.
2017-07-27 10:07:38 23427 [Note] InnoDB: Reading tablespace information from the .ibd files...
Is there anything that I can do to preserve log which shows crash source, so I would be able to fix the problem.
It is possible that from time to time MySQL server fall prey of Linux Out-of-Memory (OOM) killer process. You may find traces of such activity in
/var/log/syslog
or in an output of thedmesg
command.If system got short on RAM and killed MySQL, you could adjust settings of MySQL server process to avoid this. For example, use MySQLTuner-perl script. Performance Metrics in its output shows maximum possible memory usage by MySQL server process in percent of installed RAM.
To Answer your question, Is there anything that I can do to preserve log which shows crash source, so I would be able to fix the problem.
Yes, in your .cnf within [mysqld] section, add a new line for - expire_logs_days = 7 # from default 0 mm/dd/ccyy by xx You will have 7 days available to research before the oldest rolls off. Browse in your directory where you found error.log to see them.
I faced the same issue today on windows 10 machine. The server kept crashing at startup leaving nothing in logs of event viewer.
Just out of luck I discovered that Mysql community server (at-least version 8.x) crashed if the location we provided in setting in my.ini file is not live.
This could happen in case you updated this setting to load data files from a portable device that does not exist any more or simply your path to is incorrect