Extremely slow events page and single event page load times.

Home Forums Calendar Products Events Calendar PRO Extremely slow events page and single event page load times.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1146820
    Thomas
    Participant

    Hello, We recently noticed on our site that the main ‘Event’ page was slower than normal, and when we click to a single event, it takes 10+ seconds to load.

    I see you mentioning a previous bug for recurring events (https://theeventscalendar.com/support/forums/topic/calendar-slowing-whole-website-since-update-to-4-2-2/) which may be in play here, though we do have the latest versions of the plugins installed.

    Main event page: vegas4locals.com/events/
    Individual event: vegas4locals.com/event/las-vegas-good-news-show-taping/2016-11-17/
    Also, on the single event mentioned, notice the “Times: of the event shows the time about 60+ times. How do I fix that? There is only one place to enter a time.

    I have checked the server and had our host test things and we are not coming close to maxing out our resources, and the rest of the site loads fine.
    I have disable other plugins and the only one that causes the issue is the Events Pro plugin. When I disable that, the load time go back to normal.

    Any thoughts on how I can fix this? Should I roll back to an earlier version of the plugin(s) or what?

    Thanks

    #1147036
    Brook
    Participant

    Howdy Thomas,

    I would love to help you with this.

    That brief bug did seem to leave an impact. Not only is your single event loading slow as you mentioned, but your /all/ page is showing some duplicated. We have a full description of the bug along with a cleanup plugin that you can run that will erase any remnants of that issue. If I were you I would install that cleanup plugin, then play the waiting game. It tried to do its cleanup as fast as it can without slowing down the server, so it works in the background. It might take a few days to a week to finish, but each hour that passes your site will get a bit faster. Does running that help significantly?

    In the mean time you might be able to help by limiting the amount of events shown per page. Currently you have it set to show 50 events on your main view. While that is great for preventing people from needing to click to the next page, it also means that the main events page puts 50x the load of a normal page on your database (not the single events because of the bug, but 50x than one of your other regular WP pages). If you go to WP-Admin > Events > Settings and change the # of events per page to something like 10, the page should load noticeably faster. Once your single event page is loading fast again, you might change this back to your original. But hopefully until then this should help.

    Does that sound like a plan?

    Cheers!

    – Brook

    #1147854
    Thomas
    Participant

    We have installed the auto cleanup plugin. Is there any way to tell how the progress is going? I know you said it could take days/weeks, but how do we know when it is done? So far we are at 24 hours with no improvements (which may not be expected yet per the notes).

    #1147972
    Brook
    Participant

    There is a very direct way to check up on its status by running  a SQL query, if you’re interested in doing that. Assuming your database is prefixed with “wp_” then running this:

    SELECT * FROM wp_options WHERE option_name LIKE '%63556%'

    Will yield some results. One of the keys it might return will be called “_transient_tribe_63556_list” and it will contain a serialized list of remaining recurrence IDs that need to be processed. The first number in that serialized array will tell you how many series  it has left to process. It will look something like this (I’ve bolded the number):

    a:5:{i:0;i:140;i:1;i:1135;i:2;i:1906;i:3;i:1094;i:

    Another possible option it will return is “_transient_tribe_63556_status”. If this is “complete” then it is done running.

     

    – Brook

    #1148414
    Thomas
    Participant

    Thanks Brook!

    Looks like we still have 101 processes to go.

    a:101:{i:0;i:7255;i:1;i:7336;i:2;i:7458;i:3;i:7…

    I appreciate your help.

    #1148858
    Brook
    Participant

    Indeed! You might run that again now. I’m hoping to see the number has decreased. If it has not let me know and lets checkout event 7255. If it has a lot of duplicate recurrences we might be able to speed this up a bit.

    Thanks for getting back Thomas. I am sorry this bug has caused the site to slow down, but hopefully the tool you’re running has already gone a long ways towards fixing it.

    – Brook

    #1148876
    Thomas
    Participant

    Hey Brook, after 2+ days since the last post, I am still at 101 items left. There has been no decrease in that number.
    If you have a way to speed this up, let me know. I can dig in as deep as needed to make it happen. Thanks.

    #1149301
    Brook
    Participant

    Well then let’s dive in. Could you run the following SQL query for me, and perhaps share the output in a private reply here?

    https://gist.github.com/elimn/a998d7b67f6166dab5e17ec071eb35ee

    That will show the number of recurrences each event ID has, including any strange duplicates that might have been created by that bug. It is likely that one or two in particular will have an enormous number of recurrences.

    The output from this is the main thing I’m interested in, so if you don’t mind sharing it that would be awesome. But there is a little bit more you can try right now that might speed things up. Whichever event has the most recurrences, could you try updating it in WP Admin? Grab the event ID from the SQL query, then go to:

    http://example.com/wp-admin/post.php?post=EVENTID&action=edit

    Once you’ve pulled up the event on that page, try adding an extra space to the end of the event description, then hit update. This will cause the entire event series to be regenerated. After a few seconds the page should reload. Does it now say “Recurring event data is still being generated for this event. Don’t worry, you can safely navigate away – the process will resume in a bit in the background.” up top? If you wait a few minutes and rerun the above SQL query, are there fewer recurrences for that event ID?

    Cheers!

    – Brook

    #1149640
    Thomas
    Participant

    This reply is private.

    #1149800
    Brook
    Participant

    This reply is private.

    #1150113
    Thomas
    Participant

    Brook!! You are a lifesaver!

    I was trying to manually delete the 20k+ posts yesterday and the server kept crashing after about 100 deletes. The “update” trick crashed the server immediately, so went with the delete option. I setup an auto page refresh to keep deleting 100 every 5 minutes. I got through about 10,000 over night. Then I see your SQL technique and wiped them all out in 10 seconds.

    The site is now fast to load and back to normal. Thanks so much for your help.

    #1150359
    Brook
    Participant

    Oi! It’s crazy that it crashed. Sorry for all the hassle but I am really happy to hear that SQL query worked such a marvel. For anyone else facing a similar dilemma, here’s the relevant bits from that private reply:

    https://gist.github.com/elimn/e5de5d2037678de0b926c307022571c5

    If you want to you could follow that tutorial/sql query instead and directly delete the events. On the one hand it is very very fast. On the other hand, if you have any third party plugins that add data to posts, it is possible their data will not get deleted by this fast method. It’s a very rare thing, but it is why my preferred method for deleting those recurrences would be updating the event from WP Admin as I outlined in my last post.

    Thank you for getting back Thomas.

    • Brook
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Extremely slow events page and single event page load times.’ is closed to new replies.