Support » Plugin: Timely All-in-One Events Calendar » MAX CPU Usage

Viewing 15 replies - 16 through 30 (of 69 total)
  • Had a client site shut down by Hostgator this week for no apparent reason (no spike in visitors, no resource hog plugins that I knew of), and then I read this thread.

    We’ve got AI1EC on that site, so I ran the Debug Bar and found that a page using a calendar shortcode to display a category was using 74 queries out of 162 on the page. WooCommerce was the second biggest hog on the page, because of two widget we’re running in the sidebar.

    We’ve implemented caching on the site so hopefully this relieves the resource usage…

    Had been using Events Calendar for a long time, but lately was recommending AI1EC to clients. Will go and run a query test on the site with EC and see what we get.

    bravenewniche I hope your caching solution works for your site, however, I found All-in-One Event Calendar would not work with caching plugins such as Wp-super-cache and W3-total-cache.

    @bravenewniche can you please tell me exactly which queries are run?

    malkieh – I’m running Quick Cache on that site; so far no glitches, though I’m not running the minify yet on the JS/CSS

    nicola – Here are three illustrative queries for category colours, and none of the events on the resulting page even use any of these category colours… I can get you the complete list of 162 queries if you’d like.

    SELECT term_color FROM wp_ai1ec_event_category_colors WHERE term_id = 102
        require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/responsive/page.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, Ai1ec_Events_Helper->shortcode, Ai1ec_Events_Helper->_get_view_and_restore_globals, Ai1ec_Calendar_Controller->get_calendar_page, Ai1ec_Calendar_Helper->get_html_for_categories, Ai1ec_Events_Helper->get_category_color_square, Ai1ec_Events_Helper->get_category_color #133 (0.1ms)
        SELECT term_color FROM wp_ai1ec_event_category_colors WHERE term_id = 95
        require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/responsive/page.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, Ai1ec_Events_Helper->shortcode, Ai1ec_Events_Helper->_get_view_and_restore_globals, Ai1ec_Calendar_Controller->get_calendar_page, Ai1ec_Calendar_Helper->get_html_for_categories, Ai1ec_Events_Helper->get_category_color_square, Ai1ec_Events_Helper->get_category_color #134 (0.1ms)
        SELECT term_color FROM wp_ai1ec_event_category_colors WHERE term_id = 103
        require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/responsive/page.php'), the_content, apply_filters('the_content'), call_user_func_array, do_shortcode, preg_replace_callback, do_shortcode_tag, call_user_func, Ai1ec_Events_Helper->shortcode, Ai1ec_Events_Helper->_get_view_and_restore_globals, Ai1ec_Calendar_Controller->get_calendar_page, Ai1ec_Calendar_Helper->get_html_for_categories, Ai1ec_Events_Helper->get_category_color_square, Ai1ec_Events_Helper->get_category_color #135 (0.1ms)

    bravenewniche thanks for mentioning Quick Cache. I am trying it on a site with a All-in-One Event Calendar install.

    @bravenewniche if you can send me the complete log i’d be grateful. maybe just copy it on pastebin.

    @malkieh keep us informed on your experience with Quick Cache.

    nicola – here’s the full results of the query output

    http://pastebin.com/ErKUkaMQ

    bravenewniche

    (@bravenewniche)

    So far Quick Cache has kept things quiet on 1 of my A1EC sites.

    BTW, thought I’d share this from some stats on that same site – this just seems like a crazy waste of font-loading…

    http://seehowtwo.com/a1ec.png

    Until the plugin authors fix some of these issues – it’s such a great plugin on the front end! – as geoffreysf said, the trick is to figure out how to keep all this from loading EXCEPT on events pages… off to the drawing board!

    nicola.peluchetti

    (@nicolapeluchetti)

    Fonts should be cached by the browser, anyway they are loaded from javascript and in the next (1.11) version we will limit loading of javascript only to the pages which contain the calendar, the widget or the single event page.

    We’ve been experiencing the same issue on a few sites where this plugin is installed. I don’t believe the issue is related to the client-side loading of files. After a couple of hours of running the server reaches full CPU usage. Here is one of the common errors we’re seeing in our error log: http://pastebin.com/ry7yDdCE. Here’s also some slow queries that were logged: http://pastebin.com/dRi1ZBCX.

    Hi,

    the Uncaught exception ‘Ai1ec_Event_Not_Found’ error should be related to a bug in PHP. Usually you went to the “Add new event” page and it was blank. This should be solved in 1.10 standard.
    One other cause for High CPU usage is bot crawling. Search bots crawl calendar pages indefinitely as all the url are valid and this is known to cause problem. You must disallow crawling on sub calendar pages.
    As for the query, it’s slow, but it’s 0.001442 and it’s a simple select on a table with no JOIN so it might be slow due to some other reasons, like the high cpu usage

    The websites are all running 1.10-standard. I haven’t heard from anyone that the “Add new event” page was blank when it was being used. We also haven’t gotten any reports of seeing any issues from the error, but it was just something we saw in the logs.

    That sounds like a reasonable explanation for the slow queries, thanks.

    We’ll go ahead and try to disable crawling for calendar pages and we’ll report back.

    Also, here is our stack in case it helps you or anyone else: Ubuntu 12.04.2 LTS, Apache 2.2.22, MySQL 5.5.31, PHP 5.3.10, Varnish 3.0.3.

    We have been having a similar issue since 31 May on our site. CPU usage has been 100% and physical and virtual memory usage are all time high before the plugin was deactivated. The number of occurrences of the line showing Out of memory error associated with ai1ec files on 31 May is 10523. Here is the error log. Hope it helps.
    http://goo.gl/7b14x

    Have you all followed the directions here and created a robots.txt file?

    http://support.time.ly/limiting-excessive-google-crawls/

    we discovered today another cause for Out of Memory errors and 100 cpu usage.
    It’s a wordpress bug (or at least a strange feature 😀 ) on how it handles hierarchical posts, basically if the post_type is set as hierarchical, on some pages it loads all the events, even if you see the pagination.

    For 2000 events, that means 800 mb of memory.

    For now the solutions are only deleting past events to reduce the load or up the memory limit in PHP

Viewing 15 replies - 16 through 30 (of 69 total)
  • The topic ‘MAX CPU Usage’ is closed to new replies.