Author Archives: LinuxTech

Spamd Child process overloading server

We had a issue where the spamd child process were taking entire server down

We could see below processes

11694 byalxxed 20 0 302112 138824 4816 R 29.9 0.4 0:19.66 spamd child
22885 byalxxed 20 0 296104 131744 3740 R 28.9 0.4 0:01.18 spamd child
22887 byaxxed 20 0 296104 131744 3740 S 28.9 0.4 0:01.17 spamd child
11693 ikeuxx 20 0 308332 143124 5196 R 27.9 0.4 0:31.72 spamd child

The fix to this issue to run the below command

/scripts/autorepair spamd_dbm_fix


This is known BUG in cpanel

ImunifyAV+ Hanging

We had an issue where imunifyAv+ keeps rotation when access from WHM >plugin > Imunify

The solutions to this to restart Imunify process using below steps

Login to server and run below command as root user

service imunify-antivirus stop

mv /var/imunify360/files /var/imunify360/files_backup

service imunify-antivirus start

Disable ProxyPass cpanel

You can disable the Proxypass from httpd.conf using below command

This issue occurs in live migration in cpanel to cpanel server

whmapi1 unset_all_service_proxy_backends username=cpanelusername

mysqld: Can’t create/write to file ‘/var/run/mysqld/’

One of our server had Mysql failing to start on reboot with below error

tail -n 100 /var/log/mysqld.log
2022-03-08 3:53:37 0 [Note] Crash recovery finished.
2022-03-08 3:53:37 0 [Note] Server socket created on IP: ‘’.
2022-03-08 3:53:37 0 [ERROR] mysqld: Can’t create/write to file ‘/var/run/mysqld/’ (Errcode: 2 “No such file or directory”)
2022-03-08 3:53:37 0 [ERROR] Can’t start server: can’t create PID file: No such file or directory
2022-03-08 3:58:38 0 [Note] InnoDB: Using Linux native AIO
2022-03-08 3:58:38 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

Solution to this was

Create a new folder mkdir -p /var/run/mysqld/

Chown mysql.mysql /var/run/mysqld/

[root@ok1146s1 run]# mkdir /var/run/mysqld
[root@ok1146s1 run]# chown mysql:mysql /var/run/mysqld/
[root@ok1146s1 run]# /scripts/restartsrv_mysql
Waiting for “mysql” to start ……waiting for “mysql” to initialize ………finished.

Service Status
mariadb (/usr/sbin/mysqld) is running as mysql with PID 5809 (systemd+/proc check method).

Startup Log
Mar 08 04:08:14 systemd[1]: Starting MariaDB 10.3.34 database server…
Mar 08 04:08:16 mysqld[5809]: 2022-03-08 4:08:16 0 [Note] /usr/sbin/mysqld (mysqld 10.3.34-MariaDB) starting as process 5809 …
Mar 08 04:08:17 systemd[1]: Started MariaDB 10.3.34 database server.

mysql started successfully.
[root@ok116s1 run]#

Service Unavailable

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

While accessing one of the website saw the error mentioned above

Normally this 503 error are related to module PHP-fpm.

You just need to restart it from WHM to fix the issue

PHP Fatal error: Uncaught Error: Call to undefined function wp()

This issue is due to some core files in wordpress being corrupt.

The solution to this issue is to download new version of wordpress and upload new files and folders mentioned below

wp-includes , wp-admin and below files


This resolved the issue and wordpres site was working fine

Inoddb recovery from crash

We had a Inoddb database crash in server , Where Mysqld was not starting.

So first we checked on what databases tables are crashed or corrupted using

command mysqlcheck -A –all-databases and repaired it using

mysqlcheck --auto-repair –all-databases

You can check in below URL for additional functions using mysqlcheck

First thing we did was got mysql in recovery mode using innodb_force

As with 0,1,2 mysql was not coming up we used value 3 to get innodb online in read only mode.

innodb_force_recovery = 3

now as mysql was online we made a full dump of mysql which include all databases

mysqldump –all-databases > all_databases.sql

Once complete dump was ready

We stopped the Mysql services using below command

whmapi1 configureservice service=mysql enabled=1 monitored=0

,We moved the the

mv /var/lib/mysql /var/lib/bkp_mysql

/scripts/restartsrv_mysql –stop

We now reinitialized the mysql using below command

mysqld –initialize –user=mysql

Now we restored the dump which we had created using command

Mysql Mysql < all_databases.sql

After the dump was restored , The mysql was restarted

/scripts/restartsrv_mysql –start

whmapi1 configureservice service=mysql enabled=1 monitored=1

Mysql root password was reset using below command


How to fix innodb_table_stats and innodb_index_stats has length mismatch

While Checking Mysql error logs could see below error

2021-03-31 0:04:00 1222 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade
2021-03-31 0:04:00 1222 [Warning] InnoDB: Table mysql/innodb_table_stats has length mismatch in the column name table_name. Please run mysql_upgrade
2021-03-31 0:04:00 1222 [Warning] InnoDB: Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade

To fix this issue you need to use command


Reference is from