Fatal error running out of memory when trying to display monthly calendar

Home Forums Calendar Products Events Calendar PRO Fatal error running out of memory when trying to display monthly calendar

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1158950
    Mohamed Jawad Khaki
    Participant

    My calendar on the site has been running into this error today

    Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32 bytes) in /home/imanwa0/public_html/cms/wp-includes/wp-db.php on line 1822

    I looked through the forums and it appears that there is a recurring event on Sept 24-30 that has ended up generating 5645 events. I ran the query that I found on the forum (see attached pic). I tried to manually edit this event so that it regenerates the recurrence, but it too runs into out of memory issues. Trashing the event runs into a timeout. Is there a way I can delete all these recurring events from the backend using a SQL script?

    #1159434
    Geoff B.
    Member

    Good afternoon Sameer and welcome back!

    Thank you for reaching out to us.

    We are sorry to hear about the fatal error message you had to deal with!
    I would love to help you with this topic.

    First of all kudos on finding the culprit!

    There are a few ways you can tackle this. Normally re-saving the event would have fixed this, but since that will probably make your server run out of memory, I think we need a direct SQL solution.

    After a database backup, you can try the following SQL script: https://gist.github.com/elimn/e5de5d2037678de0b926c307022571c5

    Once that’s done, all the recurrences for that event will be gone.

    You’ll simply need to re-enter that event and re-save it at that point.

    Let me know how that goes.

    Best regards,
    Geoff B.

    #1159546
    Mohamed Jawad Khaki
    Participant

    I didn’t need to – my hosting provider upped my memory_limit and I was able to clean the event up. However, I notice that there is a bit of a perf lag now when loading the initial calendar on the home page – is there some guidance on what to do to tune it?

    #1160181
    Geoff B.
    Member

    Good evening Sameer,

    Thank you for writing back.

    I’m mostly glad that your hosting provider pitched in to help you clean up your event.

    I have nothing to compare you current performance too, and things seem to load at a decent speed.
    For a faster load time, I would recommend using: https://gtmetrix.com/

    Some simple things such as enabling Gzip compression and optimizing the images on that page should make that page lightning fast.

    You are welcome back on our support forums any time 🙂

    For now, I am going to close this thread.

    Have a great week!

    Geoff B.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Fatal error running out of memory when trying to display monthly calendar’ is closed to new replies.