Re: [squid-users] url-rewrite PHP script issue under Ubuntu 10.04

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Wed, 26 May 2010 03:38:17 +0000

On Tue, 25 May 2010 18:49:16 -0500, "Horacio H." <pokehorace_at_gmail.com>
wrote:
> Hi !
>
> I was wondering if someone else has noticed a similar behavior:
>
> I wrote an URL-rewrite script with PHP as explained at
> <http://wiki.squid-cache.org/ConfigExamples/PhpRedirectors>. The
> script was running without complains under Squid 2.7.Stable9 and
> Ubuntu 9.04, then I upgraded Ubuntu to 10.04 and warning messages
> started to show up:
>
> 2010/05/15 16:48:28| WARNING: url_rewriter #XX (FD XX) exited <----
> (repeat n-times)
> 2010/05/15 16:48:28| Too few url_rewriter processes are running
> 2010/05/15 16:48:28| Starting new helpers
>
> Things I've tried to solve the issue without success:
>
> - Simplified the PHP script to the minimum (finally just using the
> wiki's example).
> - A clean installation of Ubuntu 10.04.
> - Downgraded PHP package from 5.3 to 5.2.
> - Recompiled Squid (just in case).
>
> Perl scripts are not afected, so I rewrited/transalted the script. The
> service is up again but a big question mark was left over my head.
>
> I know it's not a Squid's issue per se, but at least the wiki may need
> to be updated before other people get stuck at this point...

Hi Horacio,
 Being a great PHP fan myself with a lot of helpers I've been fighting
this problem for a year or so now.

The issue centers around the automatic run timeouts PHP has.

Under several of the 5.0-5.2 releases the background engine has either not
obeyed the php.ini settings correctly or not obeyed run-time overrides
correctly. I pushed through and supported many alterations to Squid-3.2
which help minimize the problem, but...

As far as I can tell so far the new 5.3 engine seems not to obey either
run-time or configured settings and sticks rigidly to a 60sec timeout.
While technically helpers can be of any language, this recent behaviour
change of PHP 5.3 makes it completely useless as a Squid helper for even
small installations.

I'd advise some other scripting language for now, or if you must the very
latest squid-3.x code (http://www.squid-cache.org/Versions/v3/HEAD/) will
be important to prevent Squid constantly restarting as its helpers
self-destruct. Even then the constantly unavailable helpers make Squid a
bit slow and hang on many requests while they are restarted.

Amos
Received on Wed May 26 2010 - 03:38:25 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 01 2010 - 12:00:08 MDT