Item12349: a failing download of regex updates brings down performance

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release:
Applies To: Extension
Component: AntiWikiSpamPlugin
Branches: trunk
Reported By: MichaelDaum
Waiting For:
Last Change By: GeorgeClark
People tend to install AWSP even when not appropriate or impossible to use when running foswiki behind a firewall with the server being shielded by a firewall. As a result the plugin won't be able to download any regex updates which is done automatically in various points like as part of an beforeAttachmentSaveHandler. The operation then times out at best or the web server kills the non-responsive foswiki process in case a FcgiIOTimeout is set to a smaller value.

There are three things that can be done in these situations:

  • don't check for updates so often, i.e. when high performance is required like in (bulk-)uploads
  • setting GETLISTTIMEOUT to a very large number is probably too awkward for users to get it; how about an explicit boolean flag ONLYUPDATEOFFLINE
  • document the requirement for the server to actually be able to connect http://arch.thinkmo.de/cgi-bin/spam-merge through a firewall

It took me quite some time to find out why uploads where broken.

-- MichaelDaum - 16 Jan 2013

It would be better to only update regexes via cron and never as part of a save action.

Index: lib/Foswiki/Plugins/AntiWikiSpamPlugin/Core.pm
===================================================================
--- lib/Foswiki/Plugins/AntiWikiSpamPlugin/Core.pm      (revision 16564)
+++ lib/Foswiki/Plugins/AntiWikiSpamPlugin/Core.pm      (working copy)
@@ -26,7 +26,6 @@
     _getPluginPrefs();    # Process preference settings for the plugin
 
     _writeDebug("beforeSaveHandler( $_[2].$_[1] ) ");
-    _downloadRegexUpdate();
     $hits = 0;
     _checkText( $_[2], $_[1], $_[0] );
     return;
@@ -65,7 +64,6 @@
         }
     }
 
-    _downloadRegexUpdate();
     $hits = 0;
     _checkText( $_[2], $_[1], $text );
     return;

-- MichaelDaum - 27 Feb 2013
 
Topic revision: r6 - 25 Apr 2014, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy