• Hi all, since 11th March the site at https://www.radleyvillage.org.uk has been painfully slow. I’m talking 30 seconds and upwards to load a page, plus frequent maxing out memory. After a lot of investigation (disabling all plugins, log file analysis), I have discovered the problem to be the connections to the database. I have installed the Query Monitor plug-in which tells me on a typical page load time of 27 seconds, 25 seconds were spent performing database queries. A typical long runner is –

    SELECT ID
    FROM wp_posts
    WHERE guid=’https://www.radleyvillage.org.uk/installer/wp-content/uploads/2014/03/cropped-header6.jpg’

    which can take between 8 and 12 seconds.

    Also SELECT option_name, option_value
    FROM wp_options
    WHERE autoload = ‘yes’

    typically takes between 4 and 6 seconds.

    The site is hosted with GoDaddy and I am aware that they have had some problems of late – changes to cPanel plus some issues specifically with database latency, of which I was hoping this was part of. However they have said the issues are now resolved!
    Today I spent some time with GoDaddy on a support call, during which they advised me that they have recently done some retuning/reconfiguring on how database connections are handled, on shared hosting accounts. The gist of it seemed to be that a limit was now placed on how much resource was allocated to queries and if this was deemed to be exceeded then it would slow the site down whilst the queries eventually ran. I explained that this site has minimal traffic and the same queries (allbeit with fewer posts), run on another GoDaddy hosted site (but hosted on a ‘old style’ account which is apparantly not affect by this) in fractions of a second.
    They admitted that this is where the slowness is coming from but that is how it is now configured! I can’t believe I am the only one experiencing this, I see there are 1 or 2 posts on here about slow sites and they all seem to be GoDaddy hosted ones so maybe it’s not just me?
    I can’t believe they are saying nothing can be done.

Viewing 15 replies - 1 through 15 (of 26 total)
  • Moderator James Huff

    (@macmanx)

    That’s really not a normal query. Something is looking through all of your posts for posts which contain that image, WordPress doesn’t do that on its own.

    Try deactivating all plugins again, except the query monitor. If that resolves the issue, reactivate each one individually until you find the cause.

    If that does not resolve the issue, try switching to the Twenty Fifteen theme to rule-out a theme-specific issue (theme functions can interfere like plugins).

    Thread Starter tonysab

    (@tonysab)

    Hi James – thanks for your feedback. Yes you are correct, I have found that the initial query mentioned is indeed a theme specific query. However on other ‘old style’ GoDaddy accounts using the same theme, it runs in fractions of a second. This is true of most of the other queries, whereas on the slow site there are a several queries each taking for example 0.9 seconds each, these should be (and on the old style account are taking), like 0.03 seconds. So 10 of these = 9 seconds, so it’s the culmination of these, plus a couple of other slow ones that add up to the 20-30 seconds I am experiencing.
    Can you advise how long it takes you to get to pages on radleyvillage.org.uk?

    I still have an open incident with GoDaddy about this which I insisted on them opening, but I fear all they will continue to say is that this is how the new setup is. Which makes me think there surely must be other people experiencing the same issues?

    Moderator James Huff

    (@macmanx)

    Can you advise how long it takes you to get to pages on radleyvillage.org.uk?

    I’m not sure, to be honest. I gave up after about a minute of no activity, but this tester can get it in 32 seconds: https://www.webpagetest.org/result/150326_EG_10EX/

    I still have an open incident with GoDaddy about this which I insisted on them opening, but I fear all they will continue to say is that this is how the new setup is. Which makes me think there surely must be other people experiencing the same issues?

    To be totally honest, that is a *terrible* query, I’m surprised it worked in the first place, it probably negatively affected everyone else on your server, and I highly doubt many others have themes with the same query.

    If your theme is looking for specific posts, it should be doing that via categories, tags, post formats, or custom post types, not digging through every single post or a certain image.

    Along with GoDaddy (with is something I don’t often say), I agree that the problem is with your theme, and not their configuration.

    Thread Starter tonysab

    (@tonysab)

    Thanks for the feedback.
    I don’t dispute the query is possibly terrible, and I will contact the theme author about it. However I think the slowness of the mysql in general by Godaddy just makes it stand out more.
    In other words, I estimate that every query against the database is now taking 15 times longer than it did 3 weeks ago. So this “terrible” query, which previously took half a second, now takes 7.5 seconds etc. Likewise all the (previously very quick) queries that used to take a fifteenth of a second, now take a second, and so on.
    So whilst I don’t dispute the query may be poor, I don’t think you can say the problem is with the theme. Prior to GD making these changes the site ran normally.

    Moderator James Huff

    (@macmanx)

    Right, what I mean to say earlier is that, judging by the query and the description of the changes GoDaddy made, this is what was happening:

    Before the change: The terrible query worked well for you by essentially hogging all of the server’s resources, negatively affecting everyone else on the server.

    After the change: The server resources are now more closely guarded, so the terrible query is now simply terrible for you without negatively affecting everyone else on the server.

    What I mean by that is, the only thing to blame here is whoever put that query into your theme in the first place. GoDaddy is only doing what they should be doing as a shared hosting provider, and that’s protected the majority of their customers from resource-intensive queries and scripts.

    Thread Starter tonysab

    (@tonysab)

    OK I understand what you are saying.
    But…I have activated the 2015 theme to try this, and am typically getting response times of around 18 seconds now, with 16 seconds being DB access. So it looks like the time has just been reduced by the terrible query time. The performance is still ridiculously slow.

    As an example, with the 2015 theme it takes 3.7 seconds to run –

    SELECT option_name, option_value
    FROM wp_options
    WHERE autoload = ‘yes’

    Moderator James Huff

    (@macmanx)

    How is the database time when all plugins are deactivated while using the Twenty Fifteen theme?

    Thread Starter tonysab

    (@tonysab)

    Then it is pretty quick (as I guess you’d expect). 2 secs average, although occasionally 5 seconds.
    GD have advised they have changed something on my hosting to try and fix the issue. I had not really noticed any difference, although with all plugins on and the 2015 theme it did seem quicker than it had done previously. Switching the Graphene theme back did seem to slow it down again.
    However the more I clicked around, the faster it seemed to get (and I was clicking on different pages so don’t think it’s due to caching), suddenly I was getting 2 seconds response time with everything back on as it was. Not every single time but it does seem to have sped up a bit. Not sure how long it will last or if it’s just a temporary “go fast” but I’ll see.

    Moderator James Huff

    (@macmanx)

    Awesome, it might actually be their caching engine, some pages do share elements.

    Thread Starter tonysab

    (@tonysab)

    As I suspected, the quickness did not last long. I’m totally at my wits end with this. Further testing with no plugins activated and using the 2015 theme still regularly take 5 seconds for a response. It’s almost like there is something else affecting things as yes I accept there is a poor query in the theme (the theme author has expressed surprise at the issue it has caused) but even if this were resolved it would just mean I would get 10 second responses instead of the typical 20 seconds with the graphene theme and plugins on.
    Interestingly I have optimised every table and immediately I was getting sub second responses, I was almost dancing around the room but within a couple of minutes it was back to 20 seconds.
    Godaddy have installed a vanilla WordPress install in a subfolder on the site and this appears to run ok although there is only 1 post (the initial display of this did take 5 seconds however but since then it has been fine).
    I just don’t know what to do as I don’t feel it is down to a specific plugin or query – yes it would help if the bad query identified was fixed but how do I go about that if it’s not apparently causing issues for others? Should I add an index for guid to wp_posts? But like I said whilst this would improve things I don’t believe it would totally fix them. Even with no plugins and 2015 theme I regularly get 5 second responses for the db. Thanks.

    Moderator James Huff

    (@macmanx)

    Try this:

    1. Export the slow site via Tools > Export in the Dashboard.

    2. Import that into the new vanilla site via Tools > Import > WordPress in the Dashboard.

    On the vanilla site, with nothing brought over but the content, do you still have the slowness?

    Thread Starter tonysab

    (@tonysab)

    Thanks. I tried this and imported the posts and pages which numbered 274 and 180 respectively. The new site worked fine with those. However I also have almost 1000 Custom Posts which were not able to be imported as it said type not valid. Similarly some of the other content which relied on plugins, eg Events, NextGen gallery, also did not import. So I then deleted all posts and pages from the new site and tried again, this time using the WP CSV plugin to export and import all content, this produced a file of 3.7mb in size, however when importing to the new site, after 45 minutes it is still reporting 0% complete and there are no posts on the site.
    Thanks for your help and advice so far.

    will database caching plugin work in your case? have you tried? opened up your website, after initiall slowness it loaded quite fast.

    Moderator James Huff

    (@macmanx)

    Hm, ok, you may need the few plugins that provide custom post types to be installed and active on the new site during normal import.

    I’d recommend scrapping the current vanilla installation, then starting over with a new installation, the Twenty Fifteen theme, and the few plugins that provide custom post types. Then, try the normal import again, not the CSV import.

    Even if caching works, initial slow loading is unacceptable, and punished both by the average user, and search engines.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Godaddy very slow database performance’ is closed to new replies.