MariaDB stopped working

MariaDB crashed often for me. So I tried changing some of the values in MariaDB server configuration. Now I am getting the following error.

Job for mariadb.service failed because the control process exited with error code.
See “systemctl status mariadb.service” and “journalctl -xeu mariadb.service” for details.

MariaDB error message
The full MariaDB error message was : DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) ?

I think the OOM killer (out of memory) has been found as a culprit in the past for things seeming crashing out for no reason so this might be something to look at.

Do you have a backup of the original config? I don’t know if there are such things as stale sockets like stale lock files, but did you check to see if

already exists?

This is bad news. Your db server is down. The changes that you made to the configuration could be the reason for this.

You should reverse the changes and try restarting the server.

I dont have the original config and I cant access the UI?
Any suggestions?

Did you make the changes in /etc/?
You may have etckeeper installed.

I only made changes in the GUI at Webmin > Servers > MariaDB Server > Configuration

As has been mentioned, it’s almost always the OOM killer. MariaDB doesn’t “crash” often, so if it goes away, it’s because something killed it.

The problem now I face is, I can’t turn MariaDB back on. I restarted the server, still no hope. Showing the same error:

Error! MariaDB is not running on your system - database list could not be retrieved.

MariaDB error messageThe full MariaDB error message was : DBI connect failed : Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) ?

When I click Start MariaDB, I get the following error

Failed to start database :

Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xeu mariadb.service” for details.

you will have to fix this from the command line I’m afraid, Webmin’s mysql module does not allow you to edit it’s configuration if the mysql server is not running

You need to look at the log to see why it’s failing to start.

Maybe the journal. You can see it in the Webmin System Logs module under the mariadb unit or maybe in /var/log/mariadb/mariadb.log.

Apr 11 19:57:53 s3.educule.in systemd[1]: Starting mariadb.service - MariaDB 10.11.11 database server…
Apr 11 19:57:53 s3.educule.in (mariadbd)[3921744]: mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] Starting MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2 source revision e69f8cae1a15e15b9e4f5e0f8497e1f17bdc81a4 server_uid PSXO9KkGbSR6ykEU4JIKr9Ez72A= as process 3921744
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Compressed tables use zlib 1.3
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Number of transaction pools: 1
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Using liburing
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Initialized memory pressure event listener
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Completed initialization of buffer pool
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: End of log at LSN=1405874651846
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: 128 rollback segments are active.
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12.000MiB. Physically writing the file full; Please wait …
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12.000MiB.
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: log sequence number 1405874651846; transaction id 2505374
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] Plugin ‘FEEDBACK’ is disabled.
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=key_buffer_size=64M’
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=sort_buffer_size=4M’
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=net_buffer_length=256K’
Apr 11 19:57:53 s3.educule.in mariadbd[3921744]: 2025-04-11 19:57:53 0 [ERROR] Aborting
Apr 11 19:57:54 s3.educule.in systemd[1]: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Apr 11 19:57:54 s3.educule.in systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Apr 11 19:57:54 s3.educule.in systemd[1]: Failed to start mariadb.service - MariaDB 10.11.11 database server.
– Boot 021c1d7edca24c31ae412be0b0b66339 –
Apr 12 12:47:12 s3.educule.in systemd[1]: Starting mariadb.service - MariaDB 10.11.11 database server…
Apr 12 12:47:12 s3.educule.in (mariadbd)[956]: mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] Starting MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2 source revision e69f8cae1a15e15b9e4f5e0f8497e1f17bdc81a4 server_uid PSXO9KkGbSR6ykEU4JIKr9Ez72A= as process 956
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Compressed tables use zlib 1.3
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Number of transaction pools: 1
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Using liburing
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Initialized memory pressure event listener
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: Completed initialization of buffer pool
Apr 12 12:47:12 s3.educule.in mariadbd[956]: 2025-04-12 12:47:12 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] InnoDB: End of log at LSN=1405874651846
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] InnoDB: 128 rollback segments are active.
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12.000MiB. Physically writing the file full; Please wait …
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12.000MiB.
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] InnoDB: log sequence number 1405874651846; transaction id 2505374
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [Note] Plugin ‘FEEDBACK’ is disabled.
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=key_buffer_size=64M’
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=sort_buffer_size=4M’
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=net_buffer_length=256K’
Apr 12 12:47:13 s3.educule.in mariadbd[956]: 2025-04-12 12:47:13 0 [ERROR] Aborting
Apr 12 12:47:13 s3.educule.in systemd[1]: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Apr 12 12:47:13 s3.educule.in systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Apr 12 12:47:13 s3.educule.in systemd[1]: Failed to start mariadb.service - MariaDB 10.11.11 database server.
Apr 12 13:10:13 s3.educule.in systemd[1]: Starting mariadb.service - MariaDB 10.11.11 database server…
Apr 12 13:10:13 s3.educule.in (mariadbd)[8765]: mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] Starting MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2 source revision e69f8cae1a15e15b9e4f5e0f8497e1f17bdc81a4 server_uid PSXO9KkGbSR6ykEU4JIKr9Ez72A= as process 8765
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Compressed tables use zlib 1.3
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Number of transaction pools: 1
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Using liburing
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Initialized memory pressure event listener
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Completed initialization of buffer pool
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: End of log at LSN=1405874651846
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: 128 rollback segments are active.
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12.000MiB. Physically writing the file full; Please wait …
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12.000MiB.
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: log sequence number 1405874651846; transaction id 2505374
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [Note] Plugin ‘FEEDBACK’ is disabled.
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=key_buffer_size=64M’
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=sort_buffer_size=4M’
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=net_buffer_length=256K’
Apr 12 13:10:13 s3.educule.in mariadbd[8765]: 2025-04-12 13:10:13 0 [ERROR] Aborting
Apr 12 13:10:15 s3.educule.in systemd[1]: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Apr 12 13:10:15 s3.educule.in systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Apr 12 13:10:15 s3.educule.in systemd[1]: Failed to start mariadb.service - MariaDB 10.11.11 database server.
Apr 12 13:12:07 s3.educule.in systemd[1]: Starting mariadb.service - MariaDB 10.11.11 database server…
Apr 12 13:12:07 s3.educule.in (mariadbd)[9611]: mariadb.service: Referenced but unset environment variable evaluates to an empty string: MYSQLD_OPTS, _WSREP_NEW_CLUSTER
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] Starting MariaDB 10.11.11-MariaDB-0ubuntu0.24.04.2 source revision e69f8cae1a15e15b9e4f5e0f8497e1f17bdc81a4 server_uid PSXO9KkGbSR6ykEU4JIKr9Ez72A= as process 9611
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Compressed tables use zlib 1.3
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Number of transaction pools: 1
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Using liburing
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Initialized memory pressure event listener
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: Completed initialization of buffer pool
Apr 12 13:12:07 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:07 0 [Note] InnoDB: File system buffers for log disabled (block size=512 bytes)
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] InnoDB: End of log at LSN=1405874651846
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] InnoDB: 128 rollback segments are active.
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] InnoDB: Setting file ‘./ibtmp1’ size to 12.000MiB. Physically writing the file full; Please wait …
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] InnoDB: File ‘./ibtmp1’ size is now 12.000MiB.
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] InnoDB: log sequence number 1405874651846; transaction id 2505374
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] Plugin ‘FEEDBACK’ is disabled.
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=key_buffer_size=64M’
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=sort_buffer_size=4M’
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [ERROR] /usr/sbin/mariadbd: unknown variable ‘set-variable=net_buffer_length=256K’
Apr 12 13:12:08 s3.educule.in mariadbd[9611]: 2025-04-12 13:12:08 0 [ERROR] Aborting
Apr 12 13:12:08 s3.educule.in systemd[1]: mariadb.service: Main process exited, code=exited, status=7/NOTRUNNING
Apr 12 13:12:08 s3.educule.in systemd[1]: mariadb.service: Failed with result ‘exit-code’.
Apr 12 13:12:08 s3.educule.in systemd[1]: Failed to start mariadb.service - MariaDB 10.11.11 database server.

Solved the problem. Thank you @Joe for the clue.

/etc/mysql/mariadb.conf.d/50-server.cnf

Changed the following

set-variable=key_buffer_size=64M
set-variable=sort_buffer_size=4M
set-variable=net_buffer_length=256K

to

key_buffer_size = 64M
sort_buffer_size = 4M
net_buffer_length = 256K

Well, two questions remain. If you used the interface to make the changes that disabled the database, them did the GUI write the wrong variables?

And what was killing it initially. As stated above, if it happens again, look for the dreaded OOM killer.

I didn’t manually edit the files. So it must be the UI. The set-variable=... syntax is deprecated and unsupported in modern MariaDB versions (10.11.x and above). Maybe the UI part is not updated for the latest syntax. (May be @Joe can clarify)

And for the second part, I still have to figure out what is causing the OOM.

Remember, this is our best GUESS at what’s happening. How much physical and virtual memory do you have?

It’s a Digital Ocean droplet with 4GB Ram. At times, the ram usage showed high in graphs. When I examined, mariaDB was the culprit. How can I know which virtual server is using that much DB resources?

What OS, I can’t see anything in the post. I use Rocky9 and I don’t see the locations you use.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.