If you are starting to get the above error in the cPanel email notification cron with the below contents ::
Cron <[email protected]> /usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache DBD::mysql::st execute failed: Out of memory (Needed 4194248 bytes) at /usr/local/cpanel/scripts/update_db_cache line 61. DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at /usr/local/cpanel/scripts/update_db_cache line 63.
then don’t panic as this can simply be resolved by raising value of “max_allowed_packet” to 128 or higher in /etc/my.cnf file
for example ::
[email protected] [~]# cat /etc/my.cnf | grep max_allowed_packet max_allowed_packet = 64M
Now increase the max_allowed_packet variable limit to 128M
[email protected] [~]# cat /etc/my.cnf | grep max_allowed_packet max_allowed_packet = 128M
then finally restart the mysql service on the server
[email protected] [~]# /etc/init.d/mysql restart
Now, try to execute the command ::
/usr/bin/test -x /usr/local/cpanel/scripts/update_db_cache && /usr/local/cpanel/scripts/update_db_cache
It will execute fine this time.
That’s all you are done.