• +———————————+———-+——–+———+
    | name | status | update | version |
    +———————————+———-+——–+———+
    | aryo-activity-log | active | none | 2.6.0 |

    With this version installed, garbage collection (the delete old entries database query) is triggered about every second. The site in question has quite a lot of traffic, and around 2 million rows in the log.

    It seems the job is triggered on page-loads or something similar, it may be smarter to do this once per week on cron (no need to clean up often).

    With the current implementation a workaround to get rid of the database load problem (caused by using 3-4-5 CPU cores continuously) is to add an index to the table. More info in “Example 1” here: https://servebolt.com/help/article/speed-up-database-queries-by-using-indexes/

    That solution is band-aid though, garbage collection should not run on page-loads, and be done as an infrequent background task.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Yakir Sitbon

    (@kingyes)

    Hey @erlendeide.

    Thank you for your feedback, You’re right !
    We need to add cronjob (still, it’s cronjob by WordPress), to remove old entries.

    About adding an index to the hist_time column, we need to think about this more.

    Thread Starter erlendeide

    (@erlendeide)

    Top. I think there is no need for the index unless you are doing a query with a similar condition under other circumstances, that are not supposed to be background tasks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Excessive garbage collection’ is closed to new replies.