Jump to content

Slow site after moving host


Jozsef
 Share

Recommended Posts

I'm moving all my PW sites from my small VPS to a reseller account at A2 Hosting.

The last site I moved over became very slow though, First byte time went from less than 1s to 5s and more and fully loaded time from 2.5s to 7+.
The site is an exact copy of the old one. Any ideas what is going on?
Old place: http://debs.focuswebsolutions.ie (Apache with PHP 5.4.45 and MySQL 5.1.59)
New place: https://www.debsireland.com (LiteSpeed with PHP 7.1 and MySQL 5.1.73)

The hosting company already tested the hosting account and found everything in order.
Also, other sites I moved run at similar speeds on the old and new server.

Any suggestion where should I look? File permissions seem to be ok.

Thanks

Link to comment
Share on other sites

Traceroute is fine and htaccess files are the default PW ones, no change.

I'm pretty sure it's something about PHP/MySQL but don't know what to look for or how to debug what happens during that time before the first byte.

All sites are built on the intermediate site profile and not that much different on the template level from each other. Yet, other PW sites on the same hosting have first byte times around 600-800ms, this one has 5-8s. 

Link to comment
Share on other sites

If you're convinced it's your PHP/MySQL setup, then I suggest you start profiling your MySQL DB on both sites and compare and see if you spot anything out of the ordinary. I've done it for other databases, but not MySQL so I can't give you any specific MySQL advice I'm afraid.

https://www.google.co.uk/search?q=Profiling+Mysql+Database&oq=Profiling+Mysql+Database

 I've never had to reduce first byte time on my site (yet) so I'm not very knowledgeable in this subject matter. I think this article might get you started .. 
https://stackoverflow.com/questions/8539784/how-to-reduce-the-time-for-the-first-byte-on-my-website

Have you also run your sites through WebPageTest.org ?

Link to comment
Share on other sites

Ok, I've found the bottleneck that causes many seconds delay in processing time. When I uncomment the lines below in different foreach loops, processing time drops by 6s. The images->first statement is called about 9 times for the home page.

$block_img = $pageblock->images ? $pageblock->images->first() : null;

and

$img = $block->images->first();

I'm running the latest version of PW.

Edit:
When I had a look at the "images" field in Setup > Fields I noticed that opening that page also took 10+ seconds that is weird.
I suspect that I have a trouble with that field somehow but how to debug this issue?

Edited by Jozsef
  • Like 1
Link to comment
Share on other sites

Here's the solution I've found: disabling tags on the image field sorted all problems.

Tags were enabled for that image field but not used.When I disabled tags, everything came back to normal and the site shred off all excess processing time.
First byte time is 1s or less now.

@ryan, is it a bug or there's an explanation for this behaviour? Enabling tags brings back the slowness again.
All of that is happening on A2 reseller hosting (shared hosting with LiteSpeed, PHP 7.1 running as lsphp process) while speeds were satisfactory on my small VPS (2 cores, 2Gb RAM, Apache + PHP 5.4).

  • Like 4
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...