Table is marked as crashed and should be repaired errors

suphatchai

Registered
Jun 13, 2019
4
0
1
thailand
cPanel Access Level
Root Administrator
I have problem. In WHM I see CPU and RAM is high at one time then website is down.
Primary, restart MySQL found website is normal. Passed for a while CPU and RAM is high then website is down.

PHP and MySQL version:
PHP 7.1, MariaDB 10.0

error apache log:
Code:
[Fri Jun 14 10:30:50.630758 2019] [cgi:error] [pid 6122] [client 184.22.213.XXX:26087] AH01215: PHP Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea-php70) in /home/dynaXXXXXX/public_html/libraries/joomla/session/handler/native.php on line 194: /usr/local/cpanel/cgi-sys/ea-php70, referer: Google
[Fri Jun 14 10:31:00.275589 2019] [ssl:error] [pid 6123] (101)Network is unreachable: [client 223.205.248.118:51317] AH01974: could not connect to OCSP responder 'ocsp.comodoca.com'
[Fri Jun 14 10:31:00.275630 2019] [ssl:error] [pid 6123] AH01941: stapling_renew_response: responder error
error mysql log:
Code:
190614 10:26:19 [Warning] 'db' entry 'packingag\_db [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'packingag\_db [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'aggrogroups\_db [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'aggrogroups\_db [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'cmsshowcase\_udom [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'cmsshowcase\_udom [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'capitaleast\_wp [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'capitaleast\_wp [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'dynamicgroupthai\_db2 [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'db' entry 'suayai\_wp [email protected]' ignored in --skip-name-resolve mode.
190614 10:26:19 [Warning] 'proxies_priv' entry '@% [email protected]' ignored in --skip-name-resolve mode.
.
.
.
190614 10:26:23 [ERROR] mysqld: Table './user/wp_options' is marked as crashed and should be repaired
190614 10:26:23 [Warning] Checking table: './user/wp_options'
190614 10:26:24 [ERROR] mysqld: Table './user/wp_wfhits' is marked as crashed and should be repaired
190614 10:26:24 [Warning] Checking table: './user/wp_wfhits'
190614 10:26:25 [ERROR] mysqld: Table './user/wp_posts' is marked as crashed and should be repaired
190614 10:26:25 [Warning] Checking table: './user/wp_posts'
190614 10:26:25 [ERROR] mysqld: Table './user/wp_postmeta' is marked as crashed and should be repaired
190614 10:26:25 [Warning] Checking table: './user/wp_postmeta'
190614 10:26:49 [ERROR] mysqld: Table './user/wp_WP_SEO_Cache' is marked as crashed and should be repaired
190614 10:26:49 [Warning] Checking table: './user/wp_WP_SEO_Cache'
190614 10:28:39 [ERROR] mysqld: Table './user/wp_nf3_forms' is marked as crashed and should be repaired
190614 10:28:39 [Warning] Checking table: './user/wp_nf3_forms'
190614 10:32:10 [Note] /usr/sbin/mysqld: Normal shutdown
190614 10:32:10 [Note] Event Scheduler: Purging the queue. 0 events
190614 10:32:10 [Note] /usr/sbin/mysqld: Shutdown complete
process running to CPU and RAM high:
/opt/cpanel/ea-php71/root/use/bin/php-cgi

php.ini:
session.save_path = /var/cpanel/php/sessions/ea-php71

permission:
drwx-wx-wt 2 root root 4096 Jan 3 12:25 ea-php71

Thank you.
 
Last edited by a moderator:

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,543
208
343
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Going to be interesting chasing this down. Its going to be difficult for us to try to do this in a forum.

I will point out that you are saying its running php 7.1, but the apache log error indicates it might be 7.0

/var/cpanel/php/sessions/ea-php70

That is the path in your error log.

The first part of the mysql logs are of no concern, though you may want to consider disabling skip-name-resolve in your my.cnf.

If I had to speculate, I would suggest that it is possible that your server ran out of ram and the kernel killed the mysql process which caused the tables to crash.

You need to run a repair on the database, and check your my.cnf settings and lower some of your memory settings. mysqltuner might be of assistance here:

Code:
cd /usr/local/sbin
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
chmod 755 /usr/local/sbin/mysqltuner.pl
mysqltuner.pl