MariaDB, WHMCS and SQLSTATE[HY000]

bloatedstoat

Well-Known Member
Jun 14, 2012
184
24
68
Victoria, Australia
cPanel Access Level
Root Administrator
Hello,

We migrated (successfully) earlier this month from mySQL to MariaDB 10.1.38 on our version 78.0.18 server.

Randomly we are receiving errors from WHMCS as per below when this command is issued php -q /home/homedir/public_html/crons/cron.php escalations.

All other databases appear to be humming along nicely.

Anyone else having this issue? Can anyone suggest a fix for this?

Code:
[Illuminate\Database\QueryException]  SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared (SQL: select * from `tbltask_status` where `tbltask_status`.`task_id` = 23 and `tbltask_status`.`task_id` is not null limit 1) 

[PDOException]                                                                   
SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared all [-F|--force] [--email-report [EMAIL-REPORT]]
Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello @bloatedstoat,

There's an older thread on the WHMCS support forums with a potential workaround:

Critical Error SQLSTATE[HY000]

However, due to the age of that thread I recommend reporting this directly to WHMCS via their ticket system. Let us know the outcome once they respond.

Thank you.
 

bloatedstoat

Well-Known Member
Jun 14, 2012
184
24
68
Victoria, Australia
cPanel Access Level
Root Administrator
@cPanelMichael thanks, I will keep that article on ice for now.

I added this: innodb_buffer_pool_size = 2G to my.cnf and restarted mysql, since then there have been no further errors.

I read that the default innodb_buffer_pool_size is set to 128M by default, raising it to 2GB has (thus far) solved the problem for us.

Thanks.
 
  • Like
Reactions: cPanelMichael