-1

I don't know what's going on. My server has been fine for probably a year. Now I'm having a severe problem with MariaDB/MySQL. The DB server keeps crashing. When it does and I bring it back online I get errors, several tables are marked crashed and I have to repair them. Here are the server specs...

CloudLinux Server release 6.6 installed on Centos 6.5 (x64)
WHM/Cpanel 11.50.1 Build 1 (Current)
MariaDB 10.0.21
RAM: 3,820MB (3750MB+ in use)
Swap: 1,023MB (1,023MB in use)
4 Cores (Low idle load)
Available Disk Space: 26GB

I suspect it has to do with memory. Here's a memory alert I get in WHM:

WHM Memory Alert

Here's what I get when I try to visit a web site on my server that uses MySQL (As expected):

Warning: mysql_connect(): Connection refused in /home/mysite/public_html/index.php on line 19
Unable to connect to server.

Here's a link to the main error log of my database server (Too much to post here): http://wikisend.com/download/182056/proton.myserver.com.err.txt

This is what happens when I restart my database server from WHM. Each time I restart the db server, random tables are marked as crashed. Sometimes a lot of tables, sometimes just a few and then I have to repair them:

WHM MariaDB/MySQL Errors

Here is the contents of the /etc/my.cnf file:

root@proton [~]# cat /etc/my.cnf
[mysqld]
default-storage-engine=MyISAM
innodb_file_per_table=1
max_allowed_packet=268435456
open_files_limit=10000
innodb_buffer_pool_size=123731968

The only thing I've tried to fix this is setting this option in WHM:

Attempted Fix

I only have a handful of sites on the server. Any help is greatly appreciated.

xendi
  • 2,332
  • 5
  • 40
  • 64

1 Answers1

1
SHOW VARIABLES LIKE '%buffer%';

Do you have other products running in the same VM/server? How much of the 3750MB are they using? Consider increasing RAM as a quick fix. Otherwise, lets look for what is chewing up RAM.

You are probably no using any InnoDB tables? If not then change this to 0:

innodb_buffer_pool_size=123731968

For MyISAM, the most important factor is key_buffer_size; it should be no more than about 500M for your case.

What is WHM?

Abrupt stops of mysql (for any reason) leads to the need to REPAIR MyISAM tables ("marked crashed"). (Consider moving to InnoDB to avoid this recurring nuisance.)

Rick James
  • 135,179
  • 13
  • 127
  • 222
  • I wound up reinstalling the server because clients couldn't wait but these are good things to know. It was indeed a memory issue. I had almost no swap for one thing and I suspect cpanel wound up messing up my maria server in an update, causing it to eat up all the RAM. This server had been going for almost 2 years and I hadn't touched it in a long time. Your advice is probably the best anyone could give now that I had to reinstall. Thanks. – xendi Aug 23 '15 at 15:50