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

Upgrade from version 2.9 to 6.0.1 - Slowness for visitors

Development and Programming

Claudio's avatar
Claudio
4 posts
4 years ago
Claudio's avatar Claudio

Good Morning all,

We carried the upgrade of Expression Engine from v 2.9 to 6.0.1, after a few addons upgrades, the website was running fine. One funny thing, is that, if we are logged in on the website everything runs quick and works like a charm, but if a no logged user clicks (site visitor) through the website it takes an average of 10 seconds to open any page.

We have cleared cache, checked folder permissions, optimize tables, check all addons again, but no luck.

From what it seems, if you are logged in as super admin the number of queries to the database is an average of 50 simultaneous queries, whilst for a no logged user, it does an average of 300 queries to the database when you open a simple page. Does anyone else has incurred the same issue?

We are running out of clues here.

Thank you,

Kind Regards,

       
Rick Ellis's avatar
Rick Ellis
107 posts
4 years ago
Rick Ellis's avatar Rick Ellis

My suggestion is this: Duplicate the template that is slow so you can mess with it without disrupting your live page. Then, through a process of elimination narrow it down to the code causing the slow-down. I suspect you might be running EE tags inside other EE tags which can cause a lot of queries if you’re not careful.

       
Claudio's avatar
Claudio
4 posts
4 years ago
Claudio's avatar Claudio

Thank you for your reply.

I don’t believe It isn’t actually related to a specific template, as the slowness is noticeable for all pages. Additionally, if I suppose if it was an issue with the templates, that would actually also noticeable for SuperAdmins.

As mentioned in my initial comment, for SuperAdmins the website is working fantastic well, quick and responsive. For the guests/visitors, takes at least 10 seconds to open those pages.

       
Claudio's avatar
Claudio
4 posts
4 years ago
Claudio's avatar Claudio

Update:

It was actually EE6 legacy\libraries\Template.php -> fetch_template(), more specifically model\Template\Template.php. Let me explain, fetch_template is validating all templates user has access to (which doesn’t occur if you are a superadmin) and when it retrieves all the templates that the user has access to it triggers Template.onAfterLoad (from FileSyncedModel) which then triggers one call per template to the DB. At first sight, seems to be an issue with EE6 itself, but it could also be some setting/ configuration on our side that is triggering this behaviour.

       
Claudio's avatar
Claudio
4 posts
4 years ago
Claudio's avatar Claudio

Fix here:

https://github.com/ExpressionEngine/ExpressionEngine/issues/885

       
Tom Jaeger's avatar
Tom Jaeger
228 posts
4 years ago
Tom Jaeger's avatar Tom Jaeger

Just as a quick update for people, this has been included in the 6.0.3 release.

       

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.