Archive for the Cpanel Issues Category

DBD::mysql::st execute failed: Out of memory

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.

 

File size limit exceeded (core dumped)

Sometimes, it happens that when you try to access your domain  in a web browser you will  get a 500 Internal Server Error and after checking all  the permissions and ownerships for all  files and folders under that domain  you will find  that everything is correct but still  getting that error in  the browser.

 

But when you try  to manually execute the php file from  the server using the php command as

 

[email protected][public_html]# php  index.php
File size limit exceeded (core dumped)

you will get  the above error and now you start thinking what on earth is that .

 

Reason for that ?

 

The reason  for that error is that one of the file probably a log file under that domain exceeds to  2 GB and  by default Apache has setting enabled, to display 500 Internal  Server Error if  in case any file under a domain exceeds 2 GB.

 

How to fix ?

Just either remove that file or echo that file and you are done.

 

Tried the above fix  but still  not working ?

In that case, I  suggest you to check  all  the apache logs files specially error_log, suphp_log, suexec_log and modsec_audit.log and if you found any log file over 2 GB then just remove/echo  that file and restart apache service and you are done. 

 

That’s all