Forum: NGINX Incomplete page by nginx -> fcgi -> php-fpm with keepalive

Posted by Ondra42 (Guest)
on 2013-01-31 10:23
(Received via mailing list)
I have problem somewhere between nginx and php-fpm. When I use 
keep-alive
connection for fastgcgi php-fpm, there is often problem with loading 
page.
Page not completely loaded. I tried to debug using wireshark, and see 
that
php-fpm send to nginx coplete reply, but nginx to client sent incoplete
page. Size of incomplete page is defined by chunk size. For test, 
download
http://kinohled.cz/bugreport.tar.gz and run ./showBug.sh . You will se:

Run Nginx on port 9876
Run php-fpm on port 6789
Correct size of answer is 16172;
keepalive on,  size:  8002
keepalive off, size: 16172
 Next test (1 of 5)-
...

Tested on Debian Squeeze and many version of Nginx/PHP-FPM . Error shows 
on
default Nginx/PHP-FPM version by Debian Squeeze by dotdeb.org .

nginx/1.2.6
PHP 5.3.21-1~dotdeb.0

On Nginx error log:

upstream sent unsupported FastCGI protocol version: 0 while reading
upstream

Any suggestion ?

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,235764,235764#msg-235764
Posted by Maxim Dounin (Guest)
on 2013-01-31 12:55
(Received via mailing list)
Hello!

On Thu, Jan 31, 2013 at 04:22:48AM -0500, Ondra42 wrote:

> keepalive on,  size:  8002
> On Nginx error log:
>
> upstream sent unsupported FastCGI protocol version: 0 while reading
> upstream
>
> Any suggestion ?

Please try this patch:

http://mdounin.ru/temp/patch-nginx-fastcgi-keepalive.txt

--
Maxim Dounin
http://nginx.com/support.html
Posted by Ondra42 (Guest)
on 2013-01-31 13:31
(Received via mailing list)
This patch help!! Nice and fast work. Well done. :o)

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,235764,235779#msg-235779
Posted by zuborg (Guest)
on 2013-03-13 14:50
(Received via mailing list)
Patch helps me too. It should be added into nginx source code base asap 
)

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,235764,237297#msg-237297
Posted by Maxim Dounin (Guest)
on 2013-03-13 14:59
(Received via mailing list)
Hello!

On Wed, Mar 13, 2013 at 09:49:15AM -0400, zuborg wrote:

> Patch helps me too. It should be added into nginx source code base asap )

It's already committed in 1.3.12, and even merged to the stable
branch in 1.2.7.  If the patch works for you - it means you are
using outdated nginx.

--
Maxim Dounin
http://nginx.org/en/donation.html
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.