Jump to content

SOLVED: Frontend: Time to first byte > 20seconds, Admin lightning fast


Erik Richter
 Share

Recommended Posts

Hey Guys,

I have a site running for over 4 years (nothing has been changed technically the past years), client called me, suddenly it takes more than 20 seconds for initial site load! After that its all nice and fast, until you clear browser history and cache again.

If you directly go to the admin area (even with fresh cache) it's also lightning fast, all the time - only frontend takes 20 seconds, EVEN if I put an empty template file without any code. Other php files, not within Processwire Framework (phpinfo eg), work fine too.

Could it have something to do with the index.php/the other files that are trying to render the frontend in within Processwire framework?

Processwire 3.0, PHP 7.0, Shared Hosting (Apache) - maybe they changed something over time with the configuration? But what would end up in this specific scenario?

Any ideas highly appreciated! Thank you ?

 

Edited by Erik Richter
Problem solved
Link to comment
Share on other sites

  • Erik Richter changed the title to Frontend: Time to first byte > 20seconds, Admin lightning fast

@dragan thanks for the quick reply!

I deleted the cache folder, then did reset my browser cache, did a clean visit - to the backend first: went fine.

So I logged in, installed Tracy. Then visited the frontend from there (with fresh cache/private window) -> again: initial frontend load takes about 25 seconds.. all additional visits and page loads from there run fine, until you reopen browser or new session.

Any Ideas? Tracy shows no errors.. just the very sad load time.

 

Bildschirmfoto 2022-01-12 um 20.55.03.png

Link to comment
Share on other sites

1 hour ago, Erik Richter said:

until you clear browser history and cache again

Does your frontend do anything special related to sessions that the PW Admin doesn’t do? Maybe you can isolate what exact property of a request triggers this problem.

 

1 hour ago, Erik Richter said:

EVEN if I put an empty template file without any code

Could anything happen outside of that template file, like append/prepend files or ready.php or something?

Link to comment
Share on other sites

thanks @Jan Romero, best regards from and to Germany. Good tips, I just checked.

This specific site does not use a ready.php file, neither is it very complex. No extra hooks or anything.

What strikes me is that it has been behaving like hat for a couple of weeks now (end of November), after running without any problems for years.

It's so strange, because the admin works flawlessly and it's always only the first initial visit (until something "site wide" is cached I believe)..

Link to comment
Share on other sites

@horstthank you!

I just investigated the Modules that were running.. and luckily I found out what happened and that I was not the only one having the problem.

-> The Cookie Management Plugin Banner works with an external API which stopped working weeks ago and therefore was causing the loading times. I deinstalled it and everything is working fine again. 

Other people were talking about load times of 20-30 here (last page): 

Thank you everyone! Definitely a big portion of luck to find what exactly caused this..

 

 

  • Like 3
Link to comment
Share on other sites

  • Erik Richter changed the title to SOLVED: Frontend: Time to first byte > 20seconds, Admin lightning fast

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...