We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Man... Exception Caught, SQLSTATE[42000]: Syntax error or access violation: 1461

Development and Programming

rzerb's avatar
rzerb
7 posts
4 years ago
rzerb's avatar rzerb

Hello EE Community, Just this morning, an exception appeared when accessing any page on our site, even the admin control. Here is the exception text:

  • Exception Caught SQLSTATE[42000]: Syntax error or access violation: 1461 Can’t create more than max_prepared_stmt_count statements (current value: 16382): SELECT LOWER(module_name) AS module_name, module_version, has_cp_backend, module_id FROM (exp_modules) ee/legacy/database/drivers/mysqli/mysqli_connection.php:117

(I can add the stack trace if are interested)

What is strange is that there were no changes to the environment, the site, or its content. We also have a dev instance that points to a different DB and still the same issue. We even rolled back to a full server snapshot of 2 days ago when it was certainly working fine. We also tried to update PHP to 7.3 and no change. We are on EE v5.3.2.

Could all of this point to too many resources on our DB server and EE not gracefully degrading? Is there something we are missing or do you have ideas of what to check next?

Thank you in advance for any ideas you may have 😊 -Reid

       
rzerb's avatar
rzerb
7 posts
4 years ago
rzerb's avatar rzerb

Update! This does seem to be an environmental issue, not just one site but other sites that share resources on the DB server. It seems to clear itself of the excess prepared statements and works again after a few hours. Not sure what the issue is yet but just wanted to follow up here in case someone gets that error one day. Be well, -Reid

👍 1
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.