Home › Forums › Calendar Products › Events Calendar PRO › WordPress database errors, Slow performance and Slow Errors
- This topic has 19 replies, 2 voices, and was last updated 9 years, 1 month ago by
Matt.
-
AuthorPosts
-
February 14, 2017 at 10:23 am #1234716
Matt
ParticipantTribe,
Our server guy has said, “Your Events Calendar plugin seems to be generating a number of slow errors in PHP. It’s trying to pull a fresh copy of your calendar for each and every page each and every user visits. That’s a LOT of really big jobs. It also looks like the Calendar plugin has written some corrupted data to your database (see PHP error log attached).
This plugin seems to be the clearest culprit here.
Check with your particular plugin developer for documentation, but the best solution often is to stop making calendar refreshes page visit triggered and instead use an external cron service to hit the site at set intervals to set off the refresh job.”Any idea how to fix these errors, speed issues, or implement the cron based refreshing he’s talking about?
February 14, 2017 at 10:24 am #1234718Matt
ParticipantThis reply is private.
February 15, 2017 at 6:20 am #1235151Andras
KeymasterHello Matt,
Thanks for getting in touch. I’m really sorry that you are experiencing performance issues with our plugins.
While I take a look at your log files, I would like to ask you to do the followings as well, so we can get to the bottom of this fast.
I see in your system information that you are using version 4.4.1 of our plugins. Did you downgrade due to the performance issues? You are not experiencing the issues with 4.4.1?
I recommend the following articles for reading, which might shed some light on the issue:
- Caching Basics
- Caching Month View Transients
- The Events Calendar Performance Considerations
- Some of our favorite plugins for developers
Please let me know the answers to the above.
Thanks and cheers,
AndrasFebruary 15, 2017 at 6:35 am #1235166Andras
KeymasterAlso, can you check when you are receiving the below error messages? Is it a specific page view or event view? Single event or recurring event? That would help us narrow down the source of the issue.
[13-Feb-2017 09:42:45 UTC] WordPress database error Unknown column 'EventStartDate' in 'order clause' for query SELECT DISTINCT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) 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_term_relationships.term_taxonomy_id IN (31)
) AND wp_posts.post_type = 'tribe_events' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'tribe-ea-success' OR wp_posts.post_status = 'tribe-ea-failed' OR wp_posts.post_status = 'tribe-ea-schedule' OR wp_posts.post_status = 'tribe-ea-pending' OR wp_posts.post_status = 'tribe-ea-draft') GROUP BY wp_posts.ID ORDER BY EventStartDate DESC, wp_posts.post_date DESC LIMIT 0, 1 made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_postsand
[13-Feb-2017 16:53:10 UTC] PHP Warning: Invalid argument supplied for foreach() in /www/wp-content/plugins/events-calendar-pro/src/Tribe/Recurrence/Meta.php on line 1051Thanks!
Andras
February 15, 2017 at 10:13 am #1235833Matt
ParticipantI see in your system information that you are using version 4.4.1 of our plugins. Did you downgrade due to the performance issues? You are not experiencing the issues with 4.4.1?
Not sure I follow… I just updated from 3.11.2 to 4.4.1 which as of 6 days ago was the latest version.
The performance and errors existed on 3.11.2 and updating to 4.4.1 had no affect (so I highly doubt 4.4.2 which just came out will help any).
As for when the errors occur, I’m not able to provide any additional information. I visited pages, home, sidebar events, single events, reoccurring events, etc and the error logs aren’t showing anything so I’m not sure when/where these errors occur or how to trigger them.
February 16, 2017 at 8:50 am #1238792Andras
KeymasterHi Matt,
Although you are in doubt, as a first I would still recommend you to update to the latest version of our plugins, if you didn’t do so yet. We in general provide support for the latest version, and wouldn’t want to spend your valuable time on chasing an issue which might have been fixed meanwhile. Thanks!
It would be great to know when exactly the performance issues kick in. Without knowing that it is pretty difficult to do anything.
Also it would be great to see if you are getting the same performance issues if you deactivate all other plugins, leave only the calendar ones active, and switch to a default theme like twentysixteen. I understand that this can be difficult with a live site. Usually in these occasions we recommend setting up a test / staging site where it is possible to play around easily without affecting the live site.
Could you check these and let me know the results?
Thank and I’m looking forward to solving this with you.
Cheers,
AndrasFebruary 17, 2017 at 4:09 pm #1240508Matt
ParticipantHola,
I have updated the plugin to the latest version. I have also spun up a staging site, disabled our theme and activated 2017 theme. Disabled all plugins except events cal, events cal pro and a events cal shortcode plugin.
I will check the logs and see what’s going on.
Thanks,
Greg
February 17, 2017 at 4:24 pm #1240543Matt
ParticipantThis is a screenshot of loading a single event- over 1 minute load time. So… that’s not normal!
From the logs:
Error Log:
[17-Feb-2017 23:40:34 UTC] PHP Fatal error: Class ‘ComposerAutoloaderInit5e121ce72da7c21d41555f798d186d06’ not found in /www/wp-content/plugins/the-events-calendar/common/vendor/autoload_52.php on line 7Slow Error Log:
script_filename = /www//index.php
[0x00007f0d68ae9ab8] mysqli_query() /www/wp-includes/wp-db.php:1877
[0x00007f0d68ae9600] _do_query() /www/wp-includes/wp-db.php:1765
[0x00007f0d68ae8648] query() /www/wp-includes/wp-db.php:2388
[0x00007f0d68ae7930] get_results() /www/wp-includes/class-wp-query.php:2846
[0x00007f0d68ad9c10] get_posts() /www/wp-includes/class-wp-query.php:3238
[0x00007f0d68ad9a68] query() /www/wp-includes/class-wp-query.php:3347
[0x00007f0d68ad98c0] __construct() /www/wp-content/plugins/the-events-calendar/src/Tribe/Query.php:1017
[0x00007f0d68ad9338] getEvents() /www/wp-content/plugins/the-events-calendar/src/functions/template-tags/general.php:218
[0x00007f0d68ad9150] tribe_get_events() /www/wp-content/plugins/the-events-calendar/src/Tribe/Main.php:3779
[0x00007f0d68ad8bd0] get_closest_event() /www/wp-content/plugins/the-events-calendar/src/Tribe/Main.php:3810
[0x00007f0d68ad8740] get_event_link() /www/wp-content/plugins/the-events-calendar/src/functions/template-tags/link.php:38
[0x00007f0d68ad85d0] tribe_get_prev_event_link() /www/wp-content/plugins/the-events-calendar/src/functions/template-tags/link.php:25
[0x00007f0d68ad84c0] tribe_the_prev_event_link() /www/wp-content/plugins/the-events-calendar/src/views/single-event.php:48
[0x00007f0d68ad7e98] +++ dump failedFebruary 17, 2017 at 4:26 pm #1240546Matt
ParticipantThis reply is private.
February 20, 2017 at 2:20 am #1242005Andras
KeymasterHey Matt,
Thanks for spinning up a staging site. I did some tests as well, and single event sites are loading very slow indeed. The issue seems to be receiving the first response from the server, which can be caused be several things.
How were these current events added to the calendar? Were they imported or added manually? If you add a new event manually, does that also load slow?
Does this happen to recurring events only or any kind of event?
Who is your hosting provider and what kind of package do you have?
While you get me these answers I will try to pull somebody in to take a look at this as well.
Cheers,
AndrasFebruary 20, 2017 at 7:55 am #1242198Matt
ParticipantHow were these current events added to the calendar?
– Presumably manually. It’s possible some of them were imported a long time ago though.Were they imported or added manually?
– Added Manually as far as I know.If you add a new event manually, does that also load slow?
– Yes, I added a non reoccurring event with basic settings and it loads as slowly as all the others. (1 minute 11 second load time.)Does this happen to recurring events only or any kind of event?
– Based on last test any event.Who is your hosting provider and what kind of package do you have?
– We use Flywheel hosting and this site is one of many on our bulk plan. (We have other sites running Events Calendar on this same server with no issue).Let me know if there’s anything else I can do or provide… we are having A LOT of issues with this site and plugin at this time. Last Friday the site crashed three times!
Thanks,
GregFebruary 20, 2017 at 8:23 am #1242223Matt
ParticipantLet me know if there’s anything else I can try-
Some ideas I had was maybe deleting the Tribe database tables and seeing if the site still had these after with some test events.
Or would creating a new bespoke site and importing all of this sites data into it help any?
Thanks,
GregFebruary 21, 2017 at 1:20 am #1242807Andras
KeymasterHello again Greg,
Thanks for the answers and I’m really sorry about the crashes. This is definitely not how our plugins are supposed to work.
If you have other sites running fine with Flywheel, then it is some local issue. That can be a lot of things, like a plugin or WordPress update going south, some events having corrupted data, or corrupted / mixed up data in the database, or something we might not even think of.
Our calendar plugins don’t use separate tables for storing the information. They are stored in wp_posts, wp_postmeta and the taxonomy/terms tables.
What you can try is bulk deleting events 50-100 at a time and see if the performance improves after a while. This could help eliminate a corrupted event.
Or yes, you can set up a new site and export / import the venues, organizers and events. Though I think I would also do this in batches and check regularly if everything is still ok. (Or you done a full import, and if the performance issues come up, then re-start and do it in batches.)
Here’s a guide that can help you with exporting / importing.
https://theeventscalendar.com/knowledgebase/using-wordpress-export-tools-to-migrate-events-content/
Let me know what you decide to do and if I can support you further with anything regarding this issue.
Cheers,
AndrasMarch 3, 2017 at 12:03 pm #1249211Matt
ParticipantI’m working again on trying to isolate why the site is going slow- I did have one question though-
On many events I’m seeing the following:
Start Date: September 20, 2018
End Date: January 15, 2015Is this cause for concern? Doesn’t seem to make too much sense?
March 6, 2017 at 12:52 pm #1250063Andras
KeymasterWelcome back Greg,
Hmmm… that is definitely unusual.
When and how did that happen?
Was it after an import? How was the export and import done?
Can you update that manually when you edit the event and does that fix it?
A thought, if you plan to set up a new site / staging site, then first only add the calendar plugins.
Then add 1 event manually and check if that gives you the performance issues. If that works fine, then the plugins should be fine.
Then import some other events. I would do it in bulks of 20-50 and check the performance after each import. This can help us discover if there is any corrupted data with any of the events that can cause this issue.
Cheers,
Andras
-
AuthorPosts
- The topic ‘WordPress database errors, Slow performance and Slow Errors’ is closed to new replies.
