I've taken over a site and moved it a couple of times to different environments. It's now suffering from a slow first byte on all pages upto around 7 seconds.
I upgraded it from 2.2.5 to 2.2.6.
It's using MIGX, phpthumbof, wayfinder, getresources mainly with some javascript. I've moved it onto a subdomain of the current live site which has no delay with first byte. The host is a CPanel host with Hostgator.
I've used executioner to try and find what might be causing the delay but with no luck. I got a feeling it might be MIGX or phpthumbof and have tried uninstalling and reinstalling both but with no effect.
Could anyone give suggestions of what else I could do to resolve the issue?
Thanks
What happens with a page that has no snippet calls on it? If that's slow, it's most likely a server issue.
Hi Bob,
Thanks for the reply. I just tried using a base template with no snippet calls and that worked fine.
I've moved the site around a bit from the live site to a localhost, to a windows php install and now to the apache CPanel host. I'm thinking somewhere on the way the core or a table in the database has corrupted and causing the issue. It's about 120 pages with quite a few amends to the original. I want to avoid building in the amends again from scratch if I can.
The first thing to try is going into PhpMyAdmain, checking all tables, and selecting "repair" in the dropdown at the bottom of the grid.
Another thing to check for is a circular reference on your site, like having a getResources tag that displays the page containing the tag.
Checked through phpmyadmin and repaired tables. I've checked for circular references and calling snippets cached where I can. Shaves a bit off the delay. Just can't see what it's waiting for especially when there's no issue with speed in the backend. Not getting any errors in the error log. Could it be a permissions thing? Can't do recursive permissions on the cpanel account so I've manually changed files to 644 and folders to 755 could of missed one or two.
You often won't see a page until it's complete. If there is a lot of processing going on, there will be a long delay. Complex getResources calls, deep nesting (e.g., snippets in chunks that are pulled in another snippet), lot's of images, and conditional output modifiers all slow things down. If you have a combination of the above, it can slow things to a crawl.
I don't think it's a permissions issue -- that will make things inaccessible, but it won't slow them down.
You could also just have an overloaded database and/or PHP server. That might not show up in the Manager because so much of it is Javascript that's cached in your browser.
Think you're right. There's a lot of conditionals and output modifiers and MIGX to JSON there. I'll start to replace with some custom snippets to try and reduce the overheads. Thanks Bob