On Tue, Nov 9, 2010 at 8:41 PM, <roger(a)rogerchrisman.com> wrote:
Links 2 and 3 should match whether or not link 1 is
above them. If I
set 'pcre.backtrack_limit' to 8M, or even 2M, then the regex
successfully matches links 1 and 2 in both texts above, as intended.
With 'pcre.backtrack_limit' at its default setting, not set in
LocalSettings.php, the regex fails to match the first text above. I
think it runs out of memory because it is a _clumsy_ regex. Where
might I look for a log of it failing or running out of memory?
It doesn't sound
like it's running out of memory: backtrack_limit is
doing its job and preventing the clumsy regex from eating up the
system's resources. Out-of-memory errors will be reported in your PHP
error log or your webserver error log; backtrack_limit hits would
presumably be logged there as well, although the comment you linked to
complains that they're not.
The moral here is probably that you shouldn't use wasteful regexes
(but you can raise the limit if you must).
What is the relationship and precedence between
PHP's
'pcre.backtrack_limit' and 'memory_limit' settings?
memory_limit is
not your problem. (The line you added in
LocalSettings.php isn't even having any effect, since Setup.php raises
the limit after LocalSettings.php is loaded.)