Posted: July 2, 2021 at 8:46 am
Hi, As you know ESSA has been having some strange things happen on their website recently. I’ve asked you for support about some of them: https://eventespresso.com/topic/payment-showed-as-taking-an-amount-from-a-transaction-in-april-and-503-errors/ For hosting we are running a shared server, but the following resources are dedicated to it:
The support guys at the hosting company identified that cron jobs seem to be generating issues. We have disabled WP-CRON and created a ‘real’ cron job in cPanel to run every 15 minutes. The latest version of that job: We would like to understand more about how EE uses cron jobs as we wonder if maybe something has gone awry with them. We’ve been reading this topic: https://eventespresso.com/topic/cron-jobs-help/ Messages are generated and sent on the same request. Would reducing the number of processed messages help? I understand how relational the EE part of the database is as I was working on some custom reports. eg, I know that if we remove registrations, users will no longer be able to see them. Is it likely to affect performance if we reduced the number of events, registrations and transactions we have? For reference, there are over 800 events, 16,000 registrations and 1400 transactions. Is the version of Event Espresso that is currently in beta-testing likely to help with any of this? Do you have a date when it is likely to be ready for production? Sorry for so many questions on a Friday afternoon, but I guess it is morning for you guys? Best wishes, Anita |
|
Hi Anita,
Does that timeframe correspond with anything that happened on the site? For example, I can see you have the Automated Upcoming Event Notifications add-on enabled. So did the emails from that add-on trigger at that time?
Messages are the ‘biggest’/most resource-intensive function within EE that rely on crons although there are others. I’ll happily add some more details on this but the first thing I would do is install a plugin such as WP Crontrol so you can get a view of the WP cron jobs scheduled. How many EE cron tasks do you have? (Note, I know you’ve disabled WP Cron, but that basically just means WordPress stops checking for scheduled tasks on each and every request so the tasks then rely on the real cron step up to call wp-cron.php. That, in short means that the WP Cron tasks still run but using a different method to trigger them so the above view can help)
Possibly yes, how manage message rows do you have currently and long do you need to keep your messages for?
Before you start removing data such as the above, I’d recommend some troubleshooting to find out what is happening first. Its all guesswork right now so the answer is again ‘possibly’, but your database is designed to handle much larger numbers and EE doesn’t just pull in every row all the time so, maybe not.
No, the latest version is a change within the admin, it’s a change to the event editor itself and is unlikely to fix any of what you’ve mentioned so far.
Not a specific date, but soon 🙂
That’s why we are here, but I’m in the UK so nope, not morning for me 🙂 |
|
Hi Tony, I’ve installed WP Crontrol. There are a total of 68 cron jobs.
Wordfence cron jobs could well have been running at 11:09. The following run at hh:08
We’ve got four cron jobs from Ultimate Member. We don’t even use that plugin any more. I guess I can delete these. MainWP
We have 6868 messages, and they are stored indefinitely. Or at least “Cleanup of old messages” is set to “Forever”, presumably the same thing. I hope I’ve answered each of your questions. Best wishes, Anita |
|
Hi, Any feedback on the answers I have given here please? Best wishes, Anita |
|
That’s fine and not considered a lot by any means.
Hmm, so this is a little odd. 2 of those are expected to have no call back:
The reason for that is you have the message system set to send on the same request, but this one:
Should have a callback, which is
Whilst the timing doesn’t fit here, I’d still check your message activity list to see if messages are listed as being generated/sent at the time the high load cron is running. That add-on (AUEN for short) has a fair bit to do to trigger, generate and send the messages, we use the message queue to batch those but as you aren’t using that they may be sending all at once.
Yeah that seems likely, but I wouldn’t expect that cron to cause issues, it’s basically a time check.
They wont be doing anything if the plugin isn’t installed, but removing them wont hurt anything.
Yeah, it’s the same thing, in short, no cleanup of old messages. — Other than no callback for Are you still getting high load spikes? Always at the same time? |
|
Hi Tony, I can now click on the AUEN seems to be sending its messages in 3-hour intervals from midnight as expected from its schedule. I have asked the server guys if we are still getting spikes and if so when. |
|
Ah, great. So that’s normal then.
So for an event with say 200 registrations, it’s sending batches of say 50 at 3-hour intervals? |
|
Hi Tony, ESSA don’t have anything like 200 registrations per event. We are still getting spikes. Attached is the server log for July to date and yesterday (18th July): https://www.pastefile.com/ym9nd2 The server has been down today but is back up now. Server guys say that there was a timed out cron job that was using every available server resource. This is today’s graph: https://www.pastefile.com/e525tt It has been suggested we try running https://wordpress.org/plugins/p3-profiler/ for a short time. Best wishes, Anita |
|
By server log I mean Resource Graph |
|
Seems unlikely to be the AUEN add-on with those kinds of numbers then. Those times coincide with your events event times I assume? (6am and 9am)
A timed out cron job? Do they have any details on which specific cron job is causing this?
Sure, you can try P3 Profiler but I can tell you now without even installing the plugin, it’s going to show Event Espresso as your highest consuming plugin, why? Because it does a lot more than pretty much any other plugin on your site is going to so its stands to reason it would. P3 is great but it’s not the whole story so just a heads up that you’ll need to take the results from it with a pinch of salt. |
|
6am and 9am don’t coincide with the event times for our events. I thought they were the times at which the 3-hourly cron job runs. It wasn’t a timed out cron job. The raw access logs showed a spike in requests from some Google Cloud IPs at the same time the issue first started. These processes were killed to enable the server to come back up. I had read mixed reviews about P3, to the point where it identified itself as taking up the most resources. Site would not work without EE! |
|
Hmm, based on ‘a timed out cron job’ I was thinking along the lines of the AUEN cron possibly doing some kind of weird loop and trying to check the times matched to try and rule that out. However, AUEN has a buffer to accommodate for WP_CRON so checking the times doesn’t work for that. In short, ignore this, I don’t think this is the issue anymore.
So this isn’t an issue with crons at all then? Or are those requests triggering a cron that then kills the server?
Yeah, P3 and generally most profilers are great but it’s really easy to start looking at completely the wrong thing with them and/or start micro optimizing the wrong thing. If you have a site with XX plugins that all do very minor changes and then install P3, it’s going to list out the profile for them and yes some of those plugins will take longer than others or consume more than others but they may be completely unrelated to the issue at hand. Another site with just a few plugins doing very little and if you install P3 it may well indeed show P3 as the biggest resource hog… because it’s doing a LOT more than what the other plugins are doing so yes it uses 300% more than those plugins but that’s not necessarily a bad thing 🙂 It’s all too easy to get tied up on the numbers/green lights that apply for a general setup but just wanted to make sure you were aware it isn’t the whole story. |
|
Hi Tony, What happened on Monday was not an issue with crons. Hopefully it won’t recur. We’re still not sure what causes the other errors and server usage. Best wishes, Anita |
|
|
Hi Anita, I hope all is well. I just wanted to follow up on this. Do you still have server issues relating to EE cron tasks? Please feel free to contact us anytime if you need EE plugin info or assistance. Cheers! |
The support post ‘Weird happenings, Server resources, cron jobs, cleardown, beta version’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.