Regular MySql crashes

Problem Description

Random crashes of MySql. It can last weeks, or just a day. Normally I am out and about and the only way I can recover through my phone is a reboot of the server. Only the DB has crashed but I have no SSH access from my phone to fix it.

Any Error Messages

I think this is the most recent log, not 100% sure

2020-10-30 9:14:42 0 [Note] InnoDB: Using Linux native AIO
2020-10-30 9:14:42 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-10-30 9:14:42 0 [Note] InnoDB: Uses event mutexes
2020-10-30 9:14:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-10-30 9:14:42 0 [Note] InnoDB: Number of pools: 1
2020-10-30 9:14:42 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-10-30 9:14:42 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-10-30 9:14:42 0 [Note] InnoDB: Completed initialization of buffer pool
2020-10-30 9:14:42 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-10-30 9:14:42 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=35715502967
2020-10-30 9:14:42 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-10-30 9:14:42 0 [Note] InnoDB: Removed temporary tablespace data file: “ibtmp1”
2020-10-30 9:14:42 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-10-30 9:14:42 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12 MB. Physically writing the file full; Please wait …
2020-10-30 9:14:42 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12 MB.
2020-10-30 9:14:42 0 [Note] InnoDB: Waiting for purge to start
2020-10-30 9:14:42 0 [Note] InnoDB: 10.3.25 started; log sequence number 35715502976; transaction id 37915646
2020-10-30 9:14:42 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-10-30 9:14:42 0 [Note] Plugin ‘FEEDBACK’ is disabled.
2020-10-30 9:14:42 0 [Note] Recovering after a crash using tc.log
2020-10-30 9:14:42 0 [Note] Starting crash recovery…
2020-10-30 9:14:42 0 [Note] Crash recovery finished.
2020-10-30 9:14:42 0 [Note] Server socket created on IP: ‘127.0.0.1’.
2020-10-30 9:14:42 0 [Note] InnoDB: Buffer pool(s) load completed at 201030 9:14:42
2020-10-30 9:14:42 0 [Note] Reading of all Master_info entries succeeded
2020-10-30 9:14:42 0 [Note] Added new Master_info ‘’ to hash table
2020-10-30 9:14:42 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: ‘10.3.25-MariaDB-0+deb10u1’ socket: ‘/run/mysqld/mysqld.sock’ port: 3306 Debian 10

Environment

  • Sympl Version [9.0/10.0]: 10
  • Sympl Testing Version? [Yes/No]No
  • Debian Version [Buster/Stretch]:
  • Hardware Type? [Dedicated/Virtual/Pi]Virtual -
  • Hosted On? [name of hosting co] AWS Lightsail

How much memory does your server have? I used to get MySQL crashes all the time when I had less than 1GB of RAM.

1 Like

Currently I have 2gb ram so hopefully enough. All metrics show I am on low usage.

2GB RAM should be enough for typical usage, although you may see low memory under heavy loads.

Have a look through /var/log/syslog for the period before it started again, and that should tell you why it stopped.

MySQL suddenly stopping like that suggests it’s been terminated rather than closing cleanly, which can happen when the box runs out of RAM and the out of memory killer selects it.

Thanks. I shall await the next crash and do just that.

1 Like

My Brightbox VM only has 1 Gb of RAM and has been ok since Feb. I have enabled a Swap file just in case, but set the swappiness to 0

Bad things happened on a Bytemark VM when somehow (not persisting after reboot?) the swappiness ended up too high!