cross is now running Foswiki 2.1.3 Beta 1. Please open a task for any issues.

Item10126: Intermittent rendering issues under FastCGI

Priority: Normal
Current State: Closed
Released In: 1.1.3
Target Release: patch
Applies To: Extension
Component: EditTablePlugin
Reported By: AndrewJones
Waiting For:
Last Change By: KennethLavrsen
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
Checkins distro:d0c51b6abd8a distro:e5ad2f12000e
TargetRelease patch
ReleasedIn 1.1.3
Topic revision: r7 - 16 Apr 2011, KennethLavrsen - This page was cached on 18 Jan 2017 - 19:34.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License