Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
Here's a weird one ...

After migrating our server on the weekend, everything is working fine but WHM itself is really slow. It literally takes 30 seconds to log in and then loading any page within WHM takes 5 to 10 seconds.

Apache is serving websites fine and the server has almost zero load (we only run a handful of sites), it's just WHM itself that is having a problem.

Has anyone ever see that before?
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,836
597
273
cPanel Access Level
Root Administrator
Hey there! Do you see anything odd on the main cPanel log at /usr/local/cpanel/logs/error_log? If not, it may be more difficult to track down.

Instead of focusing on load, you may want to look at the machine's I/O wait, which does show up in the "top" command as the "wa" percentage. That could indicate an issue with a slow disk.
 

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
Here's a weird one ...

After migrating our server on the weekend, everything is working fine but WHM itself is really slow. It literally takes 30 seconds to log in and then loading any page within WHM takes 5 to 10 seconds.

Apache is serving websites fine and the server has almost zero load (we only run a handful of sites), it's just WHM itself that is having a problem.

Has anyone ever see that before?
This happens to one of my Servers also. Saying with Experience, Nothing will solve this Problem. I tried from Updates, Cloudlinux to error log but This happens always. The WHM Login takes almost 30-40 seconds and next pages load within 2-3 Seconds.

Reason for this Error: I have studied deep hard and came with the root of this Problem. Sometimes while Editing CloudLinux settings, /boot Mount Point gets some bad blocks and then Your whole OS goes into Boot errors. Whenever You will try to restart the server, It will not restart. You have to go to Rescue System and e2fsck ( fsck.ext4 /dev/nvme1n1p3 ) the Boot partition to remove bad blocks but it happens again with Every Restart and thats why I installed KernalCare so that No reboot is required.

Solution: There is a Solution but I did not apply it on servers but tried it on VM Container but it works. You have to Step down from Cloudlinux to Centos7 and then again Upgrade it to Cloudlinux which fix the OS errors. I did not perform it because I did not want downtimes but you can if Your server is new.

If You do not have Cloudlinux, Then I don't know how this problem happened to you! But this problem started after cPanel/WHM update Version 92.0.6
 

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
I don't know if it's relevant to the problem at hand, but I see this a lot in the error log ...

The system failed to connect to the “MySQL” database “mysql” because of an error: CR_CONNECTION_ERROR (Can't connect to MySQL server on '192.168.x.x' (110)) at /usr/local/cpanel/Cpanel/Mysql/Basic.pm line 437.

The IP listed is our old database IP, so it makes sense that cPanel can't connect to it, but I don't know why cPanel is trying to connect to it all the time.

I've tried to update the database profile in WHM to give it the new IP, but WHM says it can't manage the version of Maria DB that we're running. The error message is " The system does not support the version of MySQL, 10.4.12, running on the remote server. " The strange thing is that WHM was capable of running this version of MariaDB before and we haven't changed the version.
 
Last edited:

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
This happens to one of my Servers also. Saying with Experience, Nothing will solve this Problem. I tried from Updates, Cloudlinux to error log but This happens always. The WHM Login takes almost 30-40 seconds and next pages load within 2-3 Seconds.

Reason for this Error: I have studied deep hard and came with the root of this Problem. Sometimes while Editing CloudLinux settings, /boot Mount Point gets some bad blocks and then Your whole OS goes into Boot errors. Whenever You will try to restart the server, It will not restart. You have to go to Rescue System and e2fsck ( fsck.ext4 /dev/nvme1n1p3 ) the Boot partition to remove bad blocks but it happens again with Every Restart and thats why I installed KernalCare so that No reboot is required.

Solution: There is a Solution but I did not apply it on servers but tried it on VM Container but it works. You have to Step down from Cloudlinux to Centos7 and then again Upgrade it to Cloudlinux which fix the OS errors. I did not perform it because I did not want downtimes but you can if Your server is new.

If You do not have Cloudlinux, Then I don't know how this problem happened to you! But this problem started after cPanel/WHM update Version 92.0.6
Thanks Ankesh, but we don't use CloudLinux.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,836
597
273
cPanel Access Level
Root Administrator
I don't think the MySQL problem would be related to the slowness, but cPanel itself has never supported MariaDB 10.4:


We actually will most likely skip that version and move straight to 10.5 at this point.

If you'd like our team to check out the system to see if we can determine the cause of the slowness, feel free to submit a ticket.
 

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
This issue of cPanel trying to use the old IP address of the MySQL server is also preventing cPanel updates from running ...

The install encountered a fatal error: (XID t7vxq5) Cpanel::Socket::IP connection (PeerAddr 192.168.x.x PeerPort 3306 Timeout 5) failure: [Connection timed out] [Connection timed out]

Is there a config file somewhere that will allow me to update the MySQL IP, since I can't do it via WHM?
 

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
This issue of cPanel trying to use the old IP address of the MySQL server is also preventing cPanel updates from running ...

The install encountered a fatal error: (XID t7vxq5) Cpanel::Socket::IP connection (PeerAddr 192.168.x.x PeerPort 3306 Timeout 5) failure: [Connection timed out] [Connection timed out]

Is there a config file somewhere that will allow me to update the MySQL IP, since I can't do it via WHM?
You can check out MySQL Configuration file at:
Code:
/etc/my.cnf
 
  • Like
Reactions: cPRex

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
Wouldn't that be the MySQL config file? (for the local MySQL server)

I'm looking for the cPanel config file that tells cPanel where the MySQL database is.
/var/cpanel/cpanel.config (cPanel Tweak)
/etc/resolv.conf (cP Networking)
/etc/wwwacct.conf (Acc Creation logs)
 

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
/var/cpanel/cpanel.config (cPanel Tweak) seems like it's the sort of place where cPanel would store IP addresses, but it's not there.

I never dreamed that simply changing an IP address would be so devastating :)
Maybe you need to check if MySQL is occupying the Port and firewall is not Denying it because Your problems seems to have related with Connection timed out.
Try:
Code:
lsof -i:3306
Check if MySQL has occupied the port. Secondly, Go to Browser and check 3306 port accessible. It may be concerning that if the port is not occupied and service is not starting, it is related to the mysql config only
 

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
This problem is now affecting WHM pages themselves. "Tweak Settings" reports an error that starts with ...

Failed to determine MySQL state; we proceed as though the server were down. Cpanel::Exception/(XID wb3q52) Cpanel::Socket::IP connection (PeerAddr 192.168.x.x PeerPort 3306 Timeout 5) failure: [Connection timed out] [Connection timed out] at /usr/local/cpanel/Cpanel/Socket/IOBase.pm line 71.

The error is absolutely correct, 192.168.x.x does not even exist - we're on a 10.10.x.x range.

But I can't believe there's no way to tell cPanel to stop using this incorrect address and use the real one.
 

Michael Legg

Well-Known Member
Mar 2, 2015
66
4
58
New Farm, Queensland, Australi
cPanel Access Level
Website Owner
Maybe you need to check if MySQL is occupying the Port and firewall is not Denying it because Your problems seems to have related with Connection timed out.
Try:
Code:
lsof -i:3306
Check if MySQL has occupied the port. Secondly, Go to Browser and check 3306 port accessible. It may be concerning that if the port is not occupied and service is not starting, it is related to the mysql config only
I already know the reason why cPanel can't connect to this MySQL server - it does not exist. That's not my problem.

My problem is that I need to find a way to stop cPanel from insisting on trying to connect to the non-existent MySQL Server and get it to connect to the real one.