• Is it possible to stop open Simple History pages from checking for current/live/new events? Is there some code I can add to functions.php that would stop these constant requests into real-time events? Simple History’s server requests seem to be much more frequent (too frequent) when a SH page is open. (Ideally, you would add a setting option that would do this.) Why? Read on…

    Simple History is very useful. I love it. But if I’m not careful, it brings down our site!

    When I have a Simple History page open (running) in a browser tab, our site often goes down with a Resource Limit Is Reached error. We confirmed from reviewing logs that SH was the source of massive resource use and a major contributor to our site outages.

    After investigating the cause of 508 Resource Limit Is Reached errors a few months ago, our sysadmin (who I brought in for his expertise) wrote:
    “The simple history WP admin plugin appears to make frequent, expensive web requests while open in the background. [In response] we are limiting our usage of that admin page (e.g. not leaving it open in a tab) to reduce its impact on server resources.”

    A couple days ago I opened a Simple History page, but then I forgot to close it. Some hours later, the site went down with a Resource Limit Is Reached error. A user informed me of the outage and, realizing my mistake, I closed the Simple History page. The site soon started working again.

Viewing 1 replies (of 1 total)
  • Plugin Author eskapism

    (@eskapism)

    It is possible to change the interval of the checks using the filter SimpleHistoryNewRowsNotifier/interval.

    A snippet like this would change the interval from the default 10000 ms (10 seconds) to a minute (300000 ms) instead:

    
    add_filter(
        'SimpleHistoryNewRowsNotifier/interval',
        function( $interval ) {
            $interval = 300000;
            return $interval;
        }
    );
    

    I’m sorry to hear that you get “508 Resource Limit Is Reached”-errors. I have never seen that message myself. Almost every day I have multiple websites/tabs with Simple History opened in my browser and I have not experienced any performance issues on any web server.

    Any change you could share some information about your setup, so I can perhaps debug this and possible optimize the plugin if needed. Some information that would be useful: PHP version, MySQL version, number of rows in the database, installed plugins…

    • This reply was modified 2 years, 2 months ago by eskapism.
    • This reply was modified 2 years, 2 months ago by eskapism.
Viewing 1 replies (of 1 total)
  • The topic ‘How to limit SH’s resource use’ is closed to new replies.