The foswiki svn repository will become read-only on Friday 8/8. Developers should register for a http://github.com/ account for commit access to foswiki.

Item10126: Intermittent rendering issues under FastCGI

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Closed Extension EditTablePlugin  
For a while we have noticed some intermittent issues with the EditTablePlugin under FastCGI. Sometimes it would work fine, sometimes render partially, sometimes not at all.

It turns out the problem was caused by compiled regular expressions, which the plugin used in an attempt to increase performance. This works fine under plain CGI, where they are compiled for the length of the request, after which the process dies. However, under FastCGI, that same process is used for a number of requests, and the compiled regexs are not updated when variables used within it are changed. So to fix this I have removed all compiled regexs from the plugin.

Regarding performance, it turns out that since 5.6, Perl knows when a variable for the regex has been changed and will recompile if it needs to. If the variable does not change, it won't recompile (see the FAQ). So performance is not affected, whether we explicitly compile regexs are not.

I have also noticed this problem with a couple of other plugins, so will be removing compiled regexs from them too. If anyone see's a compiled regex in their code, it would probably be best to remove it to avoid similar problems in the future.

-- AndrewJones - 06 Dec 2010

 

ItemTemplate edit

Summary Intermittent rendering issues under FastCGI
ReportedBy AndrewJones
Codebase 1.1.2, trunk
SVN Range
AppliesTo Extension
Component EditTablePlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins Foswikirev:10198 Foswikirev:10199
TargetRelease patch
ReleasedIn 1.1.3
Topic revision: r7 - 16 Apr 2011, KennethLavrsen
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons License