I am using a linode with 2vCPU and 4Gb of RAM to run hesk on ubuntu.
mariadb starts fine (though service mariadb start hangs forever, if i press ctrl+c it has still started and works), hesk works fine, then eventually mysqld will crash and the log shows this
>2020-09-11 14:15:41 0 [Note] InnoDB: Using Linux native AIO
2020-09-11 14:15:41 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-09-11 14:15:41 0 [Note] InnoDB: Uses event mutexes
2020-09-11 14:15:41 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-09-11 14:15:41 0 [Note] InnoDB: Number of pools: 1
2020-09-11 14:15:41 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-09-11 14:15:41 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2020-09-11 14:15:41 0 [Note] InnoDB: Completed initialization of buffer pool
2020-09-11 14:15:41 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-09-11 14:15:41 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-09-11 14:15:41 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-09-11 14:15:41 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-09-11 14:15:41 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-09-11 14:15:41 0 [Note] InnoDB: Waiting for purge to start
2020-09-11 14:15:41 0 [Note] InnoDB: 10.3.22 started; log sequence number 1625574; transaction id 21
2020-09-11 14:15:41 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-09-11 14:15:41 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-09-11 14:15:41 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-09-11 14:15:41 0 [Note] InnoDB: Buffer pool(s) load completed at 200911 14:15:41
2020-09-11 14:15:41 0 [Note] Reading of all Master_info entries succeeded
2020-09-11 14:15:41 0 [Note] Added new Master_info '' to hash table
2020-09-11 14:15:41 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.3.22-MariaDB-1ubuntu1' socket: '/run/mysqld/mysqld.sock' port: 3306 Ubuntu 20.04
2020-09-11 14:18:33 0 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
2020-09-11 14:18:33 0 [Note] InnoDB: FTS optimize thread exiting.
2020-09-11 14:18:33 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-09-11 14:18:33 0 [Note] InnoDB: Starting shutdown...
2020-09-11 14:18:33 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2020-09-11 14:18:33 0 [Note] InnoDB: Buffer pool(s) dump completed at 200911 14:18:33
2020-09-11 14:18:35 0 [Note] InnoDB: Shutdown completed; log sequence number 1625583; transaction id 22
2020-09-11 14:18:35 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-09-11 14:18:35 0 [Note] /usr/sbin/mysqld: Shutdown complete
also this if it helps:
MariaDB [(none)]> show processlist;
+----+-------------+-----------+------+---------+------+--------------------------+------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+----+-------------+-----------+------+---------+------+--------------------------+------------------+----------+
| 1 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 3 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 2 | system user | | NULL | Daemon | NULL | InnoDB purge worker | NULL | 0.000 |
| 4 | system user | | NULL | Daemon | NULL | InnoDB purge coordinator | NULL | 0.000 |
| 5 | system user | | NULL | Daemon | NULL | InnoDB shutdown handler | NULL | 0.000 |
| 13 | root | localhost | NULL | Query | 0 | Init | show processlist | 0.000 |
+----+-------------+-----------+------+---------+------+--------------------------+------------------+----------+
and this
+------------+-------------+---------+
| host_short | users | threads |
+------------+-------------+---------+
| localhost | root | 1 |
| | system user | 5 |
+------------+-------------+---------+
OOM killer does not seem to be the issue:
journalctl -xb | grep memory
Sep 11 14:22:46 localhost kernel: check: Scanning 1 areas for low memory corruption
Sep 11 14:22:46 localhost kernel: Early memory node ranges
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0x7ffdc000-0x7fffffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0x80000000-0xafffffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xb0000000-0xbfffffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xc0000000-0xfed1bfff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xfed1c000-0xfed1ffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xfed20000-0xfeffbfff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xfeffc000-0xfeffffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xff000000-0xfffbffff]
Sep 11 14:22:46 localhost kernel: PM: Registered nosave memory: [mem 0xfffc0000-0xffffffff]
Sep 11 14:22:46 localhost kernel: Freeing SMP alternatives memory: 40K
Sep 11 14:22:46 localhost kernel: Freeing initrd memory: 79764K
Sep 11 14:22:46 localhost kernel: check: Scanning for low memory corruption every 60 seconds
Sep 11 14:22:46 localhost kernel: Freeing unused decrypted memory: 2040K
Sep 11 14:22:46 localhost kernel: Freeing unused kernel image memory: 2716K
Sep 11 14:22:46 localhost kernel: Freeing unused kernel image memory: 2008K
Sep 11 14:22:46 localhost kernel: Freeing unused kernel image memory: 1188K
Sep 11 14:22:46 localhost kernel: [TTM] Zone kernel: Available graphics memory: 2015294 KiB
I added a cron job to check and see if mysql is running and if it isnt it should run a restart script, but it isnt working either.
GNU nano 4.8
SHELL=/bin/bash
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
1 * * * * root /sbin/service mysql status || /home/mysqlstart.sh
User contributions licensed under CC BY-SA 3.0