Mariab not hanging when trying start

Please help me resolve this issue. I have installed WordPress on AWS EC2 instance. For the last 3 weeks, I observed the database was stopping by itself every week. I had to manually start it again but there were no errors. Today, the same thing happened but when I am trying to start it is hanging. I checked the mariadb.log and found the following errors:

2020-07-29 13:46:40 139736716508992 [ERROR] RocksDB: Error opening instance, Status Code: 5, Status: IO error: While lock file: ./.rocksdb/LOCK: Resource temporarily unavailable 2020-07-29 13:46:40 139736716508992 [ERROR] Plugin 'ROCKSDB' init function returned error. 2020-07-29 13:46:40 139736716508992 [ERROR] Plugin 'ROCKSDB' registration as a STORAGE ENGINE failed. Couldn't start tokuft because some other tokuft process is using the same directory [/var/lib/mysql/] for [environment] 2020-07-29 13:46:40 139736716508992 [ERROR] TokuDB unknown error 11 2020-07-29 13:46:40 139736716508992 [ERROR] Plugin 'TokuDB' init function returned error. 2020-07-29 13:46:40 139736716508992 [ERROR] Plugin 'TokuDB' registration as a STORAGE ENGINE failed. 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Uses event mutexes 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Compressed tables use zlib 1.2.7 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Using Linux native AIO 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Number of pools: 1 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Using SSE2 crc32 instructions 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size

128M

2020-07-29 17:15:47 140209630875456 [ERROR] InnoDB: mmap(137560064 bytes) failed; errno 12 2020-07-29 17:15:47 140209630875456 [ERROR] InnoDB: Cannot allocate memory for the buffer pool 2020-07-29 17:15:47 140209630875456 [ERROR] InnoDB: Plugin initialization aborted with error Generic error 2020-07-29 17:15:47 140209630875456 [Note] InnoDB: Starting shutdown... double free or corruption (out) 200729 17:15:47 [ERROR] mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.

Server version: 10.2.10-MariaDB key_buffer_size=134217728 read_buffer_size=131072 max_used_connections=0 max_threads=153 thread_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467220 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 0x0 thread_stack 0x49000

Answer Answered by Daniel Black in this comment.

The errors before "128M" above are because an existing instance of mariadb is still running.

After the "128M" is showing "Cannot allocate memory" which is because memory isn't available. This is likely because an existing mariadb instance is still running.

The reason why its stopping are going to be earlier in the log file, before where the mariadb instance is restarted.

Given two instance cannot allocate 2x128M of innodb buffer pool it might be you are running out of ram on the failure. Look at `dmesg` output on your ec2 instance.

MariaDB-10.2.10 is coming up to 3 years old and between then and the currently 10.2.32 version there are a significant number of bug fixes, one of which might be causing your crash.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.