MAX CPU Usage
-
With the latest All-in-one-event-calendar, our CPU usage has been maxed out and we are getting limited by the host. I have gone through the usual shut off all plugins to isolate the issue and it is due to AI1. Anyone have any suggestions or experiencing the same issue?
https://www.hubsportscenter.org hosted at GreenGeekshttps://www.ads-software.com/extend/plugins/all-in-one-event-calendar/
-
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
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…
https://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!
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: https://pastebin.com/ry7yDdCE. Here’s also some slow queries that were logged: https://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 usageThe 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.
https://goo.gl/7b14xHave you all followed the directions here and created a robots.txt file?
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
- The topic ‘MAX CPU Usage’ is closed to new replies.