Question

MySQL Shutsdown After 10 Seconds

Posted January 21, 2020 395 views
Linux BasicsMySQLApachePHP

Newbie here. Eveyrtime I start the mysql service, it automatically goes down after 10-15 seconds. I’ve enabled and checked the error logs and to my understanding there is no actual error in the lines. Can you provide some feedback regarding to the issue?

Here is the log output..

2020-01-21 13:32:30 0 [Note] InnoDB: Using Linux native AIO
2020-01-21 13:32:30 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-01-21 13:32:30 0 [Note] InnoDB: Uses event mutexes
2020-01-21 13:32:30 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-01-21 13:32:30 0 [Note] InnoDB: Number of pools: 1
2020-01-21 13:32:30 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-01-21 13:32:30 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-01-21 13:32:30 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2020-01-21 13:32:30 0 [Note] InnoDB: Completed initialization of buffer pool
2020-01-21 13:32:30 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-01-21 13:32:30 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-01-21 13:32:30 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-01-21 13:32:30 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-01-21 13:32:30 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-01-21 13:32:30 0 [Note] InnoDB: Waiting for purge to start
2020-01-21 13:32:30 0 [Note] InnoDB: 10.4.10 started; log sequence number 114297397; transaction id 239043
2020-01-21 13:32:30 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-01-21 13:32:30 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-01-21 13:32:30 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-01-21 13:32:30 0 [Note] Reading of all Master_info entries succeeded
2020-01-21 13:32:30 0 [Note] Added new Master_info '' to hash table
2020-01-21 13:32:30 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.4.10-MariaDB-1:10.4.10+maria~bionic-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-01-21 13:32:31 0 [Note] InnoDB: Buffer pool(s) load completed at 200121 13:32:31
2020-01-21 13:34:00 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2020-01-21 13:34:00 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-01-21 13:34:00 0 [Note] InnoDB: FTS optimize thread exiting.
2020-01-21 13:34:00 0 [Note] InnoDB: Starting shutdown...
2020-01-21 13:34:00 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2020-01-21 13:34:00 0 [Note] InnoDB: Buffer pool(s) dump completed at 200121 13:34:00
2020-01-21 13:34:00 0 [Note] InnoDB: Shutdown completed; log sequence number 114297406; transaction id 239046
2020-01-21 13:34:00 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-01-21 13:34:00 0 [Note] /usr/sbin/mysqld: Shutdown complete

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
4 answers

Hello,

It sounds like that your Droplet might be running low on memory, I would recommend checking your syslog in case that the MySQL service is being killed:

grep -i memory /var/log/syslog

If this is the case I would recommend adding some more RAM to your Droplet.

Also, you could take a look at this answer here on how to optimize your MySQL server:

https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

Hope that this helps!
Regards,
Bobby

I’ve asked the same question to the support and they come up with another answer which they say my tables might be corrupted. I’ve deleted everything, but problem persists.

Here is the output of logs you suggested.

Jan 24 08:05:42 multisite kernel: [    0.000000] Scanning 1 areas for low memory corruption
Jan 24 08:05:42 multisite kernel: [    0.000000] Early memory node ranges
Jan 24 08:05:42 multisite kernel: [    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
Jan 24 08:05:42 multisite kernel: [    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
Jan 24 08:05:42 multisite kernel: [    0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
Jan 24 08:05:42 multisite kernel: [    0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
Jan 24 08:05:42 multisite kernel: [    0.000000] Memory: 982776K/1048164K available (12300K kernel code, 2481K rwdata, 4260K rodata, 2428K init, 2704K bss, 65388K reserved, 0K cma-reserved)
Jan 24 08:05:42 multisite kernel: [    0.066844] Freeing SMP alternatives memory: 36K
Jan 24 08:05:42 multisite kernel: [    0.089494] x86/mm: Memory block size: 128MB
Jan 24 08:05:42 multisite kernel: [    0.689620] Freeing initrd memory: 19728K
Jan 24 08:05:42 multisite kernel: [    0.693154] Scanning for low memory corruption every 60 seconds
Jan 24 08:05:42 multisite lxcfs[801]:  10: fd:  16: memory
Jan 24 08:05:42 multisite kernel: [    0.963057] Freeing unused kernel image memory: 2428K
Jan 24 08:05:42 multisite kernel: [    0.980890] Freeing unused kernel image memory: 2008K
Jan 24 08:05:42 multisite kernel: [    0.985879] Freeing unused kernel image memory: 1884K

Thank you for taking the time. I’m really having hard time understanding how to interpret this data.

I also increased the memory to 512M. Problem still persists. I can increase it more, but I’m having a hard time understanding why an empty DB server needs so much ram.

Submit an Answer