Home › Forums › Calendar Products › Events Calendar PRO › HTTP 500 Error when trying to add recurring event
- This topic has 9 replies, 4 voices, and was last updated 9 years, 7 months ago by
Alex.
-
AuthorPosts
-
August 29, 2016 at 11:59 am #1157201
Alex
ParticipantHello,
I am trying to add a recurring event with several custom rules (that all repeat indefinitely).
On the server I get:
Allowed memory size of 268435456 bytes exhausted (tried to allocate 99765 bytes) in /Users/********/MAMP/tbjj/wp-includes/wp-db.php on line 1456
I have defined the memory limit to 256M in wp-config.php and wp-settings.php
I’ll need to create several events of this nature (indefinitely repeating with several custom rules) because I am building a schedule for a gym, that has classes going basically all day. My client has expressed concerns about load-time, so I’m a little concerned about the data-intensity of the Events Calendar (even if we do resolve this).
Please let me know if you think this is resolvable, and if you think the Events Calendar is the right choice for my client.
August 29, 2016 at 10:03 pm #1157408Geoff B.
MemberGood evening Craig and welcome to the Events Calendar forum!
Thank you for reaching out to us.
We are sorry to hear about the error message you are bumping into while creating recurring events.
I would love to help you with this topic.Normally, there should be a way to deal with all of your concerns (including data intensity).
It boils down to a few things:- Making sure that you have the proper settings (especially under Events -> Settings -> General – Clean up recurring events after and Create recurring events in advance for)
- Doing some automated DB maintenance via a third-party plugin
- Making sure this runs on a decent server that matches the client’s needs (number of events, type of views used, trafic, etc..)
Could you expand a bit on that client’s needs (see point 3).
Would it also be possible to get a screenshot of the edit event screen so that I can get a sense of what a typical gym event looks like.
Best regards,
Geoff B.
August 30, 2016 at 7:09 pm #1157911Alex
ParticipantHi Geoff,
I have attached a screenshot of a typical event (this event includes more custom recurrence rules, and there are several of these events I would need to add).
The client’s needs are to display a relatively busy gym schedule, with separate schedules for the first and second floors. This would mean at least 5 events similar (in data intensiveness) to the single one that is surpassing data capacity. The client would also need to display one-off events (such as seminars, food drives, etc.).
August 30, 2016 at 9:47 pm #1157948Geoff B.
MemberGood evening Alex,
Thank you for writing back, for the screenshot and for clarifying your client’s needs.
I just tried that very event on a live install and even though it took a while (provided the number of events), I was successful in creating them without the memory leak you experienced.
I am wondering if the cause of the memory usage issue you are experiencing might not be:
- Caused by your settings under Events -> Settings -> General . Could you please provide me with a screenshot of these ?
- Some setting on your localhost install
To put this into perspective, I am running things on a very average PHP 5.4.13 install with WordPress 4.6
A decent web host (e.g.: wpengine, Site ground) should be perfectly capable of handling the data intensity required IMHO.
Even with the amount of events you describe.As a side note, some of our users take performance optimization as far as using additional caching mechanism on top of our built-in ones.
In other words, I would still like to help you resolve the issue on your local install.
But I do believe that unfortunately your current experience does not reflect the performance of our plugin on a live web server.Best regards,
Geoff B.
August 31, 2016 at 8:52 am #1158169Alex
ParticipantHi Geoff,
I just uploaded the settings screenshot.
I changed the cut-off for future events to 1 month and the error report got strange:
Allowed memory size of 268435456 bytes exhausted (tried to allocate 118325 bytes) in /Users/*********/MAMP/tbjj/wp-includes/wp-db.php on line 1456
It’s saying that it tried to allocate a number of bytes that is below the capacity it’s stating.
It appears that changing the recurrence settings did help. Any advice from here?
Alex
August 31, 2016 at 11:41 pm #1158605Geoff B.
MemberGood evening Alex,
Thank you for writing back.
This is indeed very strange. It only reinforces my suspicion that something might be up on that local install.
I will relay this to our Dev team to see if they have any idea of where this might be coming from.In the meantime, is there a possibility for you to try this out on an actual web server so that you can test it for yourself ?
Best regards,
Geoff B.
September 1, 2016 at 6:04 pm #1159085Alex
ParticipantI have successfully created less data-intensive recurring events, on local host, after having set the cut-off for future event instances to 1 month.
The default was 24 months, and was the setting when the troublesome event was created. When I try to edit the event, the WordPress admin tells me that there are almost 3000 instances on the database. I was thinking that this could be part of the problem, so I tried to delete the event in order to recreate with the new 1-month cut-off. However, the Trash process simply takes forever and then just stops (I can’t get it to work). Deleting each recurring instance would take forever too.
I will try and recreate my event on another one of my live websites, but can you let me know how I can delete the event? If the WP admin won’t let me do it, can it be done from PHP MyAdmin?
September 2, 2016 at 3:27 pm #1159543Geoff B.
MemberGood evening Alex,
Thank you for writing back.
I am glad you are making progress on your local install.
As stated before, I think you might have been a victim of a bad combination of things: server setup, script timeout setting, etc…
In the end, if my calculations are correct, there should be 1 event + 9 recurrences per week for that event.
52 weeks x 2 years x 10 events a week should add up to about 1040 events, not 3000.So something most likely went very wrong in the process.
Out of curiosity, if you get a chance, would you mind running some tests with a city based timezone as opposed to a UTC based one ? (make sure your WordPress settings are set to that as well, so that we leave no stone unturned)The good news is that we have a couple of SQL scripts to control recurrence events that go out of hand if you are up for that.
Because you know exactly which event is faulty, you could simply:- Re-save that event (should trigger the recurrence rebuild)
- Use the following script to remove all recurrences in batch (before re-saving): https://gist.github.com/elimn/e5de5d2037678de0b926c307022571c5
Let me know if that helps.
Have a great day!
Geoff B.
September 24, 2016 at 9:35 am #1168336Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘HTTP 500 Error when trying to add recurring event’ is closed to new replies.
