• Resolved gmariani405

    (@gmariani405)


    Your plugin is causing constant memory usage alerts. We use it on one page and all it does is load in an iCloud calendar. This is the page it shows on: https://churchformen.com/my-calendar/

    You can see below the plugin is going crazy:
    [15-Mar-2016 15:36:46 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 452
    [15-Mar-2016 15:37:43 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 400
    [15-Mar-2016 15:39:55 UTC] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 452
    [15-Mar-2016 15:40:58 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 32 bytes) in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 24
    [15-Mar-2016 15:40:58 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
    [15-Mar-2016 15:43:47 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 79 bytes) in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 22
    [15-Mar-2016 15:43:47 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
    [15-Mar-2016 15:48:25 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72 bytes) in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 23
    [15-Mar-2016 15:48:25 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
    [15-Mar-2016 15:49:30 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 79 bytes) in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-calendar.php on line 22
    [15-Mar-2016 15:49:30 UTC] PHP Fatal error: Unknown: Cannot use output buffering in output buffering display handlers in Unknown on line 0
    [17-Mar-2016 00:18:30 UTC] PHP Warning: date_time_set() expects parameter 1 to be DateTime, boolean given in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php on line 2100
    [17-Mar-2016 00:18:30 UTC] PHP Fatal error: Call to undefined function amr_tell_eror() in /home/USERNAME/public_html/wp-content/plugins/amr-ical-events-list/includes/amr-ical-events-list-main.php on line 2120

    Can you please either tell me how to fix this or if you can fix it’s memory usage. Thanks

    https://www.ads-software.com/plugins/amr-ical-events-list/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author anmari

    (@anmari)

    This might help
    https://icalevents.com/5142-memory-problems-or-timeouts/

    Do post back on what your situation was (memory setting, volume of events etc)

    Note you also have some other problem possibly unrelated:
    Cannot use output buffering in output buffering display handlers in Unknown on line 0

    This shouldn’t be happening. Please check what your timezone setting in wordpress general settings is – bets for most accurate timezone including daylight saving etc, is a city based timezone.

    date_time_set() expects parameter 1 to be DateTime, boolean

    I’ll check why it doesnt ave the tell error.

    Thread Starter gmariani405

    (@gmariani405)

    anmari,

    WP Version 4.4.2
    WP Admin Memory Limit 256M
    WP Base Memory Limit 40M
    PHP Version 5.4.43
    Server Type Apache

    From your settings page:
    Your php version is: 5.4.43
    Your timezone db version is: 2014.8
    The plugin thinks your timezone is: America/New_York
    Choose seconds before timeout for each ics file fetch: 5

    Here is the shortcode used, you can see nothing fancy:
    [largecalendar https://p02-calendars.icloud.com/published/2/…648I ]

    The file is 62k and has about 101 events, I don’t know if that is considered a lot. Let me know if that helps.

    Plugin Author anmari

    (@anmari)

    40 Mb is a rather low default setting depending what you all have running. See for various ways to increase it.
    https://www.google.com.au/search?q=wp+memory+limit+40mb

    101 events is only a lot if many are recurring events and/or your memory is low.
    AS noted above the more event instances there are the more work/memory wp needs

    Plugin Author anmari

    (@anmari)

    You should also check your plugin settings for the ‘maximum’s set as noted in the post I originally linked to.

    That ‘max’ execution time also looks dodgy – either a problem getting the ics file (slow other server?) or some other problem perhaps ?
    I would have checked your ics file for you but the url is not fully displayed above.

    Thread Starter gmariani405

    (@gmariani405)

    The maximums were set to default:

    Events: 200
    Days: 31
    Cache: 24

    I didn’t even know about the specific calendar configurations, I didn’t think your plugin even had settings (there is no settings page). So whatever the default was is what is there most likely. I think the only thing I may have changed was regarding styling.

    “either a problem getting the ics file (slow other server?) or some other problem perhaps ?” – It’s on iCloud so I doubt they have a slow server to deliver a 62k file.

    Here is the full URL: https://p02-calendars.icloud.com/published/2/VYdHkja_wHcIiyx1Rjx7OeFf8JXBufEUAdsnn8paYoEZYICerIG0-4kIMeRSxw535A4xVkp7uTd0DMldhYMU_gcFClg_Vxfon5Y6YRq648I

    The 40M base memory limit is the default WordPress limit and again untouched. But if your plugin is running on the admin side, it would be limited to the 256M limit instead.

    If you can look at the file and you still feel like the memory should be increased I can, but I find it hard to think that every single user needs more than 40M to visit a site because of a calendar used on one page of the site.

    Plugin Author anmari

    (@anmari)

    Hi Gabriel, You’re absolutely right – it’s not because of a calendar used on one page. Memory usage is an incremental thing. The site is probably running out of memory because of other factors. As noted in the post linked to above
    https://icalevents.com/5142-memory-problems-or-timeouts/, sometimes the last plugin activated is what throws it over the edge.

    The churchformen calendar is running happily here with startoffset=-600 (negative to include those ‘old’ events) days=2000 events=300
    https://test.icalevents.com/agenda/random-ics-test/
    AND According to the ‘debug bar’ plugin even with about 18 plugins active, and such huge parameters, the test site is only using about 16Megabytes. on a default wordpress theme.
    https://i.imgur.com/wnAx7o9.png

    So the bulk of memory usage on the churchformen site is caused by something else. It maybe the theme adding a load – you could play around with memory plugins so see what’s causing the most load.

    If you changed the order of plugin activation, you;d probably find that the memory usage message would then occur on the last activated plugin. eg like here: https://www.ads-software.com/support/topic/wc-not-working-with-wc-themes?replies=9

    I see the site is on php 5.4. This person seems to think that upgrading php also helps reduce memory usage. I haven’t personally tested that.
    https://brianshim.com/webtricks/reduce-wordpress-memory-usage/

    Thread Starter gmariani405

    (@gmariani405)

    Thanks for looking into this, I’ll see if maybe other plugins are causing the issue then.

    Plugin Author anmari

    (@anmari)

    Please post back for the education of us all as to what was causing the main memory usage.

    Thread Starter gmariani405

    (@gmariani405)

    I did some plugin testing to see memory usage (P3 Plugin Profiler) and was able to disable some plugins the client wasn’t using that were taking a ridiculous amount of ram. But even then, the theme itself uses adds about 1.5 to the load time, not much else I can do there. The site was just built inefficiently, can’t help that if the client doesn’t want me to. But just wanted to see if the error messages from your plugin COULD have been a cause. Sorry there isn’t a better resolution here.

    Plugin Author anmari

    (@anmari)

    Thanks for the update. Good Luck.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Excessive Memory Usage’ is closed to new replies.