Events Cal makes site slow; deactivating plugin creates blank home page

Home Forums Calendar Products Events Calendar PRO Events Cal makes site slow; deactivating plugin creates blank home page

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #236142
    els76uk
    Participant

    I’ve noticed that in recent weeks, my site has become very slow. I deactivated plugins one by one to see if any were the cause, and it turned out to be The Events Calendar which was slowing it down. However, when The Events Calendar was deactivated, I get a home page devoid of any stories.

    It’s meant to look like this but when the plugin is deactivated, it looks like this.

    My ISP also told me told me –

    I would note that your discodamaged.com WordPress install appears to have a potential coding issue as a query being made against its wp_posts table is regularly taking a very long time to complete, an example of the query in question is:

    # Time: 140619 16:37:32
    # User@Host: discodam_wp3[discodam_wp3] @ localhost []
    # Query_time: 178.758675 Lock_time: 0.000143 Rows_sent: 10 Rows_examined: 235619
    SET timestamp=1403192252;
    SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.*, IF (wp_posts.post_type = ‘tribe_events’, wp_postmeta.meta_value, wp_posts.post_date) AS post_date, tribe_event_end_date.meta_value as EventEndDate FROM wp_posts LEFT JOIN wp_postmeta as wp_postmeta on wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = ‘_EventStartDate’ LEFT JOIN wp_postmeta as tribe_event_end_date ON ( wp_posts.ID = tribe_event_end_date.post_id AND tribe_event_end_date.meta_key = ‘_EventEndDate’ ) WHERE 1=1 AND wp_posts.post_type IN (‘post’, ‘tribe_events’) AND (wp_posts.post_status = ‘publish’) GROUP BY IF( wp_posts.post_parent = 0, wp_posts.ID, wp_posts.post_parent ) ORDER BY post_date DESC LIMIT 0, 10;

    Can you help? I wonder if it’s related to the previous issue I reported, whereby events were duplicated many times, and whether it’s left remnants of that in the database, causing congestion?

    #236233
    els76uk
    Participant

    Update: when I switch to 2014 theme, with The Events Calendar disabled, the posts reappear. With the plugin enabled, the page won’t load.

    #237392
    els76uk
    Participant

    Update: I have tried installing two different themes from wordpress.org – BresponZive and Max Magazine and both fail to load while The Events Calendar is active. When inactive, the posts load, but of course that means I’m without my calendar.

    #238187
    Barry
    Member

    Hi: I’m sorry you’re hitting these problems.

    In the first instance I just wanted you to know that we’re working hard to deliver improvements specifically in relation to the performance of various database queries. As you can appreciate, this is something we need to take some time on in order to get it right and prevent breakages – so, realistically, this isn’t something that we’ll be able to turnaround in a matter of a few days or even weeks.

    I’d be interested to learn a little more about your specific circumstances, though:

    • How many events do you have?
    • Approximately how many are recurring?
    • Can you provide any information about your current web hosting package?

    Thanks!

    #249773
    els76uk
    Participant

    Hi Barry, I asked for help from a business partner, who is a developer, who told me –

    query

    IF (wp_posts.post_type = ‘tribe_events’, wp_postmeta.meta_value, wp_posts.post_date) AS post_date

    is generally clunky. It brings back loads of data, and degrades (possibly even exponentially) the more content you have in the system.

    I’ve looked around the plugin, which generally looks pretty solid, the code is ok, but I just get the impression they’ve not considered so many posts in the system when putting it together.

    To answer your question, I actually don’t know how many events there are, as I didn’t enter them. It tells me there are about 6,000 calendar entries in total; but of course, it may be counting each subsequent recurring event separately. Virtually all of our events are recurring, mostly sent to never end.

    My web hosting package is with Blackfoot on their Business package. If you need technical details, please let me know what you need to find out, and I’ll pass the message on; or feel free to email them yourself and ask whatever you need – they’re usually pretty quick and helpful.

    For now, we have a caching plugin installed, which is helping to make things better, but sometimes the page still doesn’t load. I wonder if it’s simply that there’s too many entries in the calendar system, and that’s what’s causing trouble?

    #250034
    Barry
    Member

    OK, so that looks like a fairly standard and inexpensive shared hosting plan (if I was looking at the correct one) and I think it’s important to note straight up that, realistically, there are limits to everything.

    If you have approximately 6,000 events, a large percentage of which are recurring instances, and are a comparatively busy site it may simply be the case that you have outgrown what that plan can offer since, as you can appreciate, the hosting environment also needs to be capable of meeting the demands of the application.

    IF (wp_posts.post_type = ‘tribe_events’, wp_postmeta.meta_value, wp_posts.post_date) AS post_date

    is generally clunky. It brings back loads of data, and degrades (possibly even exponentially) the more content you have in the system.

    I’ve looked around the plugin, which generally looks pretty solid, the code is ok, but I just get the impression they’ve not considered so many posts in the system when putting it together.

    The Events Calendar has been deployed on projects in receipt of very high volumes of traffic – and with large numbers of posts in the database – so I’m not sure that’s really a fair comment: using it as we do in larger projects like that we are definitely conscious of its ability to scale.

    I’m curious though about the feedback on the query fragment – was your colleague highlighting the IF statement specifically or was some of the query dropped from your post (which is possible, the forum isn’t great at handling code so using services like Pastebin and Gist is recommended)?

    #250046
    els76uk
    Participant

    Thanks Barry. You’re right that the plan chosen is a good price; could you please clarify what I need to ask for from a provider. There’s nothing in the documentation that I can find that states minimum specs from the host.

    Yes, he was highlighting that IF statement specifically. Having said that, I don’t understand it myself, so was hoping it’d mean more to you than to me.

    #250286
    Barry
    Member

    Could you please clarify what I need to ask for from a provider. There’s nothing in the documentation that I can find that states minimum specs from the host.

    Right – because the plugin will run pretty much in any environment meeting the minimum standards for WP itself. What’s tricky though is offering guidelines above and beyond that.

    The caching systems you have (and are able to set up), the volume of traffic, the hardware, the web server itself, how much work the database server is fielding (perhaps it serves multiple otherwise independent hosting accounts) right through to your PHP memory settings and how many plugins you have installed all impact … and that’s not even taking into consideration the number and nature of events you are dealing with – or indeed the event related settings.

    Every now and then, for example, we see people who have effectively lifted the limit on the number of events that can be displayed per table cell in month view and, in some cases, over a thousand events are being rendered in that view: naturally, if a cached version of that view cannot be served (or whenever it must be generated), building views in conditions like that is going to be comparatively resource-intensive than if reasonable constraints were in place.

    Not to say that last example is directly applicable here – but just to give a sense of the complexity of situations like this.

    Taking things down to brass-tacks, though, given the number of events you have and assuming it’s not an unpopular site it may be that trying to host it on this particular plan may be overly ambitious – and perhaps upgrading to something on the next tier, or to a VPS with suitable dedicated resources, would be worth investigating.

    Yes, he was highlighting that IF statement specifically. Having said that, I don’t understand it myself, so was hoping it’d mean more to you than to me.

    OK, well I’ll certainly note it for future review – it definitely will cause more work to be done than if it wasn’t present, of course, but I’m not sure saying it causes a load of data to be returned (that wouldn’t otherwise be) is valid.

    All that to say, we definitely appreciate your feedback and insight into your situation – it’s valued and potentially will help us to shape things in a way that will benefit you and other customers over the lifetime of the product.

    I’m not sure there’s too much more we can offer in the short-term though, unless you have any further questions?

    #250316
    els76uk
    Participant

    The Barry. Not sure what helps a great deal, because at present, my site isn’t operating properly; as I said earlier, when I disabled the plugin, it made the site go blank. That’s not right, surely?

    My site certainly meets the minimum WP standards; but I can’t say how much further it goes. However, it definitely doesn’t render anything even close to 1,000 on the calendar page view. In any case, it was only the home page which wouldn’t load; other pages were loading fine, including the events calendar page itself. Now we have caching, things are better, but far from perfect.

    If you could give me a clue how to resolve this, I’d be really appreciative.

    #250381
    Barry
    Member

    as I said earlier, when I disabled the plugin, it made the site go blank. That’s not right, surely?

    No, that’s not right. So do you have any code in your theme/theme’s functions.php file that relates to The Events Calendar? Might that be the source of the problem (in that, if The Events Calendar is inactive and it’s libraries haven’t been loaded, any such code in your theme will fail)?

    If so, you’d need to remove those customizations or protect them with extra safeguards.

    #250410
    els76uk
    Participant

    So do you have any code in your theme/theme’s functions.php file that relates to The Events Calendar?

    The only code I have in there relating to The Events Calendar is to exclude it from site search, which is code I found on this forum. I’ll send you a private link so you can take a look, but I’d be surprised if that were the cause.

    #250472
    els76uk
    Participant

    This reply is private.

    #250855
    Barry
    Member

    Can you try commenting it out/temporarily removing it, then deactivate The Events Calendar, and see if you’re still left with the same problem?

    The thing is that the code refers to TribeEvents::POSTTYPE but that symbol will not be defined if The Events Calendar is no longer active.

    #252942
    Barry
    Member

    Hi! Did that work for you – are you now able to safely deactivate The Events Calendar?

    #406305
    els76uk
    Participant

    Thanks, yes, commenting out the code to exclude The Events Cal from ste search fixed it. I’ve now given up on The Events Calendar, as my hosts deactivated my site yesterday when they saw excess server load:

    It has come to our attention that the WordPress install on your account
    is causing load issues on the server as such I have now disabled the
    public access to the file index.php.

    The site is not subject to any attack, the database of your wordpress install is causing the problem here. I can see a lot of queries remaining in sleep state. They seem to be ones on the event section as well. This is causing the web connections to persist and not exit as well. Could you look in to this and have ti fixed.

    This is disappointing, as it’s potentially a great plugin, yet it’s been by far the biggest cause of headaches for me in the months that I’ve been running the site.

Viewing 15 posts - 1 through 15 (of 16 total)
  • The topic ‘Events Cal makes site slow; deactivating plugin creates blank home page’ is closed to new replies.