[php-maint] Bug#514832: Bug#514832: php5: performance: php_curl_stream_read() unnecessarily sleeps 15 secs under heavy load.

Raphael Geissert atomo64+debian at gmail.com
Wed Feb 11 17:34:00 UTC 2009


2009/2/11 giuseppe bonacci <g.bonacci at libero.it>:
> Package: php5
> Version: 5.2.0-8+etch13
> Severity: normal
> Tags: patch, upstream
>
>
> php_curl_stream_read() in ext/curl/streams.c always calls select() after
> firing up a connection.  however, when the php client is under heavy
> load, the server might have already responded, and the last call to
> curl_multi_perform() before entering the loop might have received all
> the data and closed the connection.  at this point, curl_multi_fdset()
> in the loop returns maxfs == -1, and the following select turns into a
> pointless 15 sec sleep.
>
> I believe this problem is related to http://bugs.php.net/bug.php?id=23258

Although it could be possible that a similar situation happens when
using the standard streams functions it is not caused by this bug in
curl, because curl is not used by fopen/fsockopen and friends.

>
> please see the attached patch.

The patch looks good, thanks! Have you considered reporting this bug
to upstream so that we don't just fix it locally? Please do it, thanks
in advance.

> regards
> g.b.
>

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net





More information about the pkg-php-maint mailing list