Intermittent error Prepared statement needs to be re-prepared

Everything to do with Joomla! 4.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Tue Feb 17, 2009 2:19 pm

Intermittent error Prepared statement needs to be re-prepared

Post by oorzaak » Fri Oct 08, 2021 12:46 pm

Hi,

We are developing a new site using Joomla 4. Unfortunately we have an intermittent error going on, which says:
Prepared statement needs to be re-prepared
See also attached screenshot.

Reloading the page does not solve it immediately. After a few minutes the site will be running fine again, without any actions from us.

We cannot find out any pattern behind this. I may happen when just visiting a page as a frontend user, or when working in the back end.

We've tried many things, like switching off extensions, but we didn't find a solution yet.

In the error reporting, we also see that this line is highlighted:

Code: Select all

 $template = $db->loadObject();
For your information: we cloned the Cassiopeia and made some template overrides on this clone (we like to keep our overrides outside the original core template, just in case any core updates might result in a conflict). Still, we cannot find any flaws in our clone or overrides that could explain this error. Also, the site may be running fine for an hour or more while we are working on it, and then suddenly display this error again. I would expect an error in our overrides to give a more consistent error pattern.

Hope that anyone recognizes this issue?

[edit: forgot to upload the screenshot]
Prepared_statement_needs_to_be_re-prepared__500_Whoops__looks_like_something_went_wrong__.jpg
You do not have the required permissions to view the files attached to this post.
Last edited by imanickam on Fri Oct 08, 2021 1:04 pm, edited 1 time in total.
Reason: Moved topic » from Performance - Joomla! 4.x to Templates for Joomla! 4.x

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41705
Joined: Sat Apr 05, 2008 9:58 pm

Re: Intermittent error Prepared statement needs to be re-prepared

Post by Webdongle » Tue Apr 05, 2022 2:05 pm

Does it only happen with your copy?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

oorzaak
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Tue Feb 17, 2009 2:19 pm

Re: Intermittent error Prepared statement needs to be re-prepared

Post by oorzaak » Thu Jun 30, 2022 7:48 am

For us, this issue seems to be hosting dependent. We developed the site on one hosting, then transfered it to another hosting environment for production. We do not have this issue at all on the production hosting.

However we dit not yet solve it on the develop hosting.

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 23791
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: Intermittent error Prepared statement needs to be re-prepared

Post by pe7er » Thu Jun 30, 2022 7:56 am

oorzaak wrote:
Thu Jun 30, 2022 7:48 am
For us, this issue seems to be hosting dependent.
Are you using the same SQL database & version on the working and non-working websites? so both MySQL or both Mariadb, and both the same version?
Could compare the MySQL configuration settings?
Kind Regards,
Peter Martin, Global Moderator
https://db8.nl - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com


Post Reply

Return to “Templates for Joomla! 4.x”