Jump to content

Site with 20,000 pages, first load of the CMS is very very slow


cjx2240
 Share

Recommended Posts

Hi all

I've just spent a few days moving all the content from a big old site to ProcessWire. Everything was going fine, I've been going in and out of the CMS since the content was added with no issues.

There's a lot of fields, a lot of images, not many repeaters though, the majority of it is just text data.

Then a few days later when I try to access the CMS,  I hit an error:

Breaking news… Fatal Error: Maximum execution time of 120 seconds exceeded

If I keep trying, eventually I will get in. And when I do, things will be running smoothly. But then the next day, I'm back to that one really long wait again.

Any tips for diagnosing where it gets stuck? or any suggestions of things that I can change or turn off that might run once per session?

Link to comment
Share on other sites

  • cjx2240 changed the title to Site with 20,000 pages, first load of the CMS is very very slow

A look in all logs could be helpful. Maybe there is a more detailed error somewhere.

Besides that we could try to figure out if there are any hooks or modules involved that might cause those issues.

Are there any actions like database backups or do you perform any checks while logging in or via hook?

Do you use ready.php or _init.php somewhere?

I guess at some point someone might say TracyDebugger can help in such cases but I rarely use it so I can't assist with it.

TL;DR

  • what's in ready.php?
  • what's in _init.php?
  • which modules are installed?
  • what's written in all the logs?
  • Like 2
Link to comment
Share on other sites

Hey guys, thanks for the tips.

No lazycron but that would be a very good shout.

I have ready.php - but it only has one hook for SEO Maestro tags rendering

I don't think _init.php is getting involved called when logging into the CMS - at least if I die() there, it doesn't happen.

There are quite a few modules installed, I work for an agency which has a sub to various profields, formbuilder etc. I could try eliminating some of them.

The only logs that get written during this window of logging in are compiling the ready.php file for login/ and the successful login in the session... nothing else

 

Link to comment
Share on other sites

Good idea - I just had another very slow load - and I did that, none of the number seem particularly high to me!

 

Screenshot 2021-12-17 174905.png

 

Another thing I find odd is that I can't recreate it by clearing my browser session or anything like that, only by coming back after some (unknown) amount of time. So it really seems to be related to something that happens after a certain amount of time has passed, like cache regeneration or something?

Link to comment
Share on other sites

Today I seem to have hit a new wall suddenly. After working in the CMS all day for the last 6-7 hours, all of a sudden I cannot get into the CMS at all

Last time I managed to look at some errors in Tracy it reported timeouts from all these within the same minute or two

Fatal Error: Maximum execution time of 120 seconds exceeded (line 856 of [...]\public_html\wire\core\Functions.php)
Fatal Error: Maximum execution time of 120 seconds exceeded (line 319 of [...]\public_html\wire\core\Session.php)
Fatal Error: Maximum execution time of 120 seconds exceeded (line 206 of [...]\public_html\wire\core\PagesLoaderCache.php)

 

Link to comment
Share on other sites

ProcessWire 3.0.184.

I'm running a xampp server on Windows 10

server setup

  • Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/7.4.19
  • Database client version: libmysql - mysqlnd 7.4.19
  • PHP extension: mysqli
  • PHP version: 7.4.19

db

  • Server type: MariaDB
  • Server version: 10.4.19-MariaDB

I did eventually get back in but I'm expecting it to happen again in a few hours.

Link to comment
Share on other sites

On 12/15/2021 at 6:19 PM, cjx2240 said:

I have ready.php - but it only has one hook for SEO Maestro tags rendering

You know what, I think I might've figured out the cause. And I should've thought about it when I mentioned this 👆

I think it's SEO Maestro regenerating the sitemap. It's something that triggers when you load the CMS after 120 minutes.

You can get around this by disabling automatic generation and setting up a scheduled task to trigger it, there's more info in the thread for that extension.

  • Like 3
Link to comment
Share on other sites

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...