Help on mysql hostname log error

ultralion

Well-Known Member
Nov 14, 2012
51
0
6
Viareggio
cPanel Access Level
Root Administrator
Hi :)
Today i had some issue on my hosting. My vps was down so i suppose my provider give them an hard reset to make it workly.
After that some table on a cms were broken (regarding sessions). So i fix them and then i move to:
/var/lib/mysql to see error generated in the logs.
I check what was happening on that website log... BUT
with my surprise i've seen a 1GB log size of "myhostname.err" :eek::eek:
So i suppose this log is not rotating. How i can solve this? I can brutally remove this file or there are some commands to clean it??
Many Thanks
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
I suggest you rename it,
mv myhostname.err myhostname.err.OLD
and then restart mySQL.

Then you should find out why the file is so big.
 

ultralion

Well-Known Member
Nov 14, 2012
51
0
6
Viareggio
cPanel Access Level
Root Administrator
well done. Right now i din't opened large file
but i can see just a new log was immediatly created and it contains
130918 14:46:44 [ERROR] /usr/sbin/mysqld: Table './cphulkd/logins' is marked as crashed and should be repaired
How i can fix that?
 

ultralion

Well-Known Member
Nov 14, 2012
51
0
6
Viareggio
cPanel Access Level
Root Administrator
well done. Right now i din't opened large file
but i can see just a new log was immediatly created and it contains
130918 14:46:44 [ERROR] /usr/sbin/mysqld: Table './cphulkd/logins' is marked as crashed and should be repaired
How i can fix that?

well right now i fixed that table simply with phpmyadmin.
Seems that new one log file ins't updating anymore.
The huge file contains at last ever this message (so i suppose is broken since many time).
I've 2 questions...
-How possible this table broken itself? I read could be also the cron -upcp that run everynight on my server automatic??
-Now is safe to delete the previously error log file with .OLD extension to save space on my vps?
Thanks again
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

Yes, the previous log file is not required so it's safe to remove it. There are several potential reasons why the "cphulkd" database can become corrupted. It's possible the database was not shut down successfully, or MySQL was killed during a write. The best way to resolve this issue is to simply repair the database. EX:

Code:
mysqlcheck --repair cphulkd
Thank you.
 

ultralion

Well-Known Member
Nov 14, 2012
51
0
6
Viareggio
cPanel Access Level
Root Administrator
Ok many thanks. Last question.. i check also Apache errors log and seems huge too now i'm going to ispectioning them.
I can do same procedure renaming these files then restarting apache?
the files are:
suphp log 250MB
error log 109MB
These files are rotating or not? Many thanks again
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
Can be done in WHM also:
WHM -> SQL Services -> Repair a MySQL Database

- - - Updated - - -

I can do same procedure renaming these files then restarting apache?
Yes.

the files are:
suphp log 250MB
error log 109MB
These files are rotating or not? Many thanks again
See in :
WHM -> Service Configuration-> Apache Configuration-> Log Rotation
 

ultralion

Well-Known Member
Nov 14, 2012
51
0
6
Viareggio
cPanel Access Level
Root Administrator
Can be done in WHM also:
WHM -> SQL Services -> Repair a MySQL Database

- - - Updated - - -




Yes.



See in :
WHM -> Service Configuration-> Apache Configuration-> Log Rotation
Many thanks quietFinn
In fact i've seen they are rotating but max filesize is 300MB so its explain their size.
I'm a newbie on cpanel so i think never take a look on this logs for months :( vps is working without issues so i didn't care.
Since now i will take a look also if these files are increasing continuously or if are single warning/issues occourred in a long time.
Thanks again!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
MIn fact i've seen they are rotating but max filesize is 300MB so its explain their size.
To note for others that may view this thread, the "Log rotation size threshold" value is adjustable under the "Stats and Logs" tab in:

"WHM Home » Server Configuration » Tweak Settings"

Thank you.