Tuning MariaDB

VM Pro - CentOS 7

Just finished migrating to CentOS 7 and trying to getting use to the new MySQL replacement. I quickly discovered MariaDB is configured too conservatively and was crashing. Similar to a problem I had with the old mySQL crashing during backup and Eric had me add ulimit -n 16384. Took me a whole day to figure out how to accomplish the same thing with MariaDB, but I did and backups went fine.

However this morning MariaDB crashed again. Now I’m wondering if it’s the connection limit. I think I have adjusted that successfully, need to give it some time to know for sure if it is or if that was even the reason for the last crash. Don’t know where the log is for this to check.

MariaDB takes forever to restart or hangs completely with a failed restart. So my questions; what’s causing the long restarts and how to fix? What are the recommended limits for open files, connections, etc?

Thanks,
Brian

Howdy,

Hmm, are you seeing any errors in MariaDB logs (I’m not sure which either, but I’d look for logs named mariadb in /var/log), or in “dmesg|tail -30”?

Also, how much RAM does your server have? You can determine that by running “free -m”.

-Eric

Eric,

Thanks for your response. Okay, at the time I was looking for the log, I didn’t even know what mariadb was. Now I see it and it has several errors that may be useful.

One repeating error message is telling me a handful of virtual servers are out of space. This is due a ton of PHP Strict Standards error message that now occur since the upgrade. The error log gets so big it maxes out the accounts space. If I remember right, can’t this alone bring down all the other database sites (as crazy as that seems)?

This is the error repeated for each user when it got hung while restarting mariadb:

150504 6:41:30 [ERROR] mysqld: Got an error writing communication packets
150504 6:41:30 [Warning] /usr/libexec/mysqld: Forcing close of thread 103201 user:

The new server has 16GB of ram.

Brian