• Resolved SteelWagstaff

    (@steelwagstaff)


    We make an open source book publishing platform, that extends and transforms a WordPress multisite into a CMS for books. Each ‘site’ on the network is a book, and a given multisite can have hundreds or or more books/sites on it. We host several individual multisites/networks on a single AWS server. We use the Roots tools Trellis and Bedrock to manage application cofiguration and server provisioning, including managing a system cron. We would like to add Koko Analytics as an optional tool for all of our book authors, but when we recently activated the full Koko cron for all the books/networks on our staging server, the every minute cron job consumed an enormous amount of CPU (close to 100% for about four hours) before stabilizing. The CPU appeared to be within accepted usage for about an hour and a half before starting to spike again. We decided that the CPU usage was too concerning and turned the cron job off for our server. We’ve read other support tickets that seem similar/relevant, like https://wordpress.org/support/topic/days-of-stats-in-only-one/ and https://wordpress.org/support/topic/does-koko_analytics_aggregate_stats-need-to-run-every-minute/ and https://wordpress.org/support/topic/modifying-the-widget-feature-request/. Basically, we’re trying to determine whether we can safely use this plugin in our situation (multiple WordPress multisite networks on a server, each with dozens/hundreds of individual sites) and how you might recommend modifying/structuring a cron job to scale for our needs. Thanks again for all you do to make privacy-respecting web analytics easier!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter SteelWagstaff

    (@steelwagstaff)

    Upon closer inspection, I think what may have happened is that the cron jobs were trying to process several days worth of visit data in the uploads/pageviews.php file on lots and lots of sites (we had the plugin activated for a while on the staging server, but no functional cron job). Is there a recommended way to clear the pageviews.php that is storing all the page visit information that the cron job would normally save to the database? If we deactivate/reactivate the plugin will it flush/dump this file, for example?

    Plugin Support Lap

    (@lapzor)

    I would just manually delete the file via a file manager, Koko will automatically re-create it.

    I am interested to learn how many lines you have in the current pageviews.php file for it to cause a 4 hour 100% cpu load!! Could you email the file to me at support @kokoanalytics.com ? (or if it’s too large for email zip it send send me a download link?)

    Thanks!

    Thread Starter SteelWagstaff

    (@steelwagstaff)

    There are hundreds, if not thousands, of pageviews.php files on the server — one for each of the books in each of the separate WordPress multisite networks, which is part of the problem, I think. We don’t allow access to any part of the server via a file manager (too insecure).

    Plugin Support Lap

    (@lapzor)

    ok, I will report the issue to Danny and see if we can reproduce it. I imagine it must be an incredible number of views before it takes up such an amount of CPU, or maybe there is something else at play still…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cron issues’ is closed to new replies.