php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37448 FastCGI Error: Server too busy Server
Submitted: 2006-05-15 17:05 UTC Modified: 2006-11-10 16:24 UTC
Votes:23
Avg. Score:4.7 ± 0.6
Reproduced:22 of 22 (100.0%)
Same Version:13 (59.1%)
Same OS:10 (45.5%)
From: coder1 at gmail dot com Assigned: dmitry (profile)
Status: Not a bug Package: CGI/CLI related
PHP Version: 5.1.4 OS: Windows XP
Private report: No CVE-ID: None
 [2006-05-15 17:05 UTC] coder1 at gmail dot com
Description:
------------
isapi_fcgi.dll fails to load PHP properly on WinXP SP2/IIS5.1

There are no errors showing up in the event log. When I configure IIS to php-cgi.exe, the page loads as expected.

This was an upgrade from 5.1.2 to 5.1.4.  5.1.2 works OK with the same isapi_fcgi.dll.

Additionally, I tested the Zend FastCGI file (zend_fcgi.dll) included with Zend Core.  This version of FastCGI works OK. It is Caraveo's version (and my modification originating from this source) which previously worked on 5.1.2 that now fails to work with 5.1.4.

Reproduce code:
---------------
<?
phpinfo();
?>

Expected result:
----------------
Display PHP Information

Actual result:
--------------
HTTP/1.1 503 Server too busy Server: Microsoft-IIS/5.1 Date: Wed, 10 May 2006 17:09:58 GMT Connection: close Content-Type: text/html Server Error, unable to connect to fastcgi server.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-15 17:16 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-05-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-05-27 15:07 UTC] msisolak at yahoo dot com
I am also able to reproduce this on the current 5.2 branch (built: May 27 2006 16:22:11) with isapi_fcgi.dll (FCGI_SERVER_VERSION = 2.2.2 0.5.2 beta).  It appears to be triggered by an echo that is larger than some magic number around 16kB.  This code:

<?php
	echo str_repeat(str_repeat("-=-=-=", 20) . "<br>", 131);
?>

outputs a page that is 16,244 bytes.  If I increase the count to 132 (what would be 16,368 bytes) I get:

"HTTP/1.1 503 Server too busy
Server: Microsoft-IIS/5.1
Date: Sat, 27 May 2006 15:05:07 GMT
X-Powered-By: ASP.NET
Connection: close
Content-Type: text/html

Server Error, unable to connect to fastcgi server."
 [2006-05-30 15:16 UTC] coder1 at gmail dot com
The bug does seem to go away with the 5.2 version.

I am also able to reproduce the behavior described by msisolak exactly.
 [2006-06-20 14:48 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-06-28 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-07-30 23:16 UTC] djohnson241 at gmail dot com
I can verify the above experiment.  I got the 5.2 snapshot and used the following:

<?php
	echo str_repeat(str_repeat("-=-=-=", 20) . "<br>", 131);
?>

That works fine.  But change the 131 to 132 and you get the 503 error.  At a loss.
dave
 [2006-07-30 23:34 UTC] djohnson241 at gmail dot com
Some more information( hopefully useful ).

After further testing I was able to determine that this is only happening for me if I output a lot of text at once.  If I split it up into a bunch of smaller echo's, it works fine.

Unfortunately this doesn't work with my template system, as all output is echoed in one statement.
dave
 [2006-09-07 10:13 UTC] robert dot sevcik at gmail dot com
Hello, I confirm, still no go with latest snapshot
 - 5.2.0RC4-dev, Build Date Sep 7 2006 00:15:28  

I tried phpinfo() with CGI only, go
Tried the same with isapi_fcgi.dll, no go

Then I changed output_buffering=1000 and... GO! :)

(Windows 2003 server SP1)
 [2006-09-07 10:20 UTC] robert dot sevcik at gmail dot com
I tested it with my app, output_buffering doesn't workaround the problem fully. Bigger output still harmes the fastcgi.
 [2006-09-07 14:12 UTC] robert dot sevcik at gmail dot com
I'm sorry for spamming, but I went a step further, downgraded to PHP Version 5.1.0-dev and the FastCGI has no problem.
Build date Jun 21 2005 12:21:48
 [2006-09-28 17:34 UTC] randy at rcs-comp dot com
I am requesting that this bug status be changed to "open" since there has been plenty of feedback and until the bug has been confirmed to be fixed. 

I have also run into this same issue with php > 5.1.4 including the latest 5.1 snapshot.  My solution was to use 5.1.2 instead.
 [2006-10-05 02:51 UTC] xangelusx at hotmail dot com
I confirmed the problem using msisolak's test on a Win 2003 server with PHP 5.1.6 running under fastcgi. Same on a Windows 2000 server with same PHP config.
 [2006-10-11 02:31 UTC] snoopspecial at hotmail dot com
I have the same problem using Windows 2003 SP1 and PHP 5.1.6

I tried the output buffering = 1000 and no luck either.

please fix!
 [2006-10-19 23:19 UTC] sbugs6 at yahoo dot fr
With PHP 5.2.0RC6-dev (Oct 19 2006 20:17:20) on WinXP-SP2

<?php
echo str_repeat("-", 16340); // ok 
echo str_repeat("-", 16341); // 503 Server too busy 
?>
 [2006-11-07 05:26 UTC] xangelusx at hotmail dot com
Still having trouble on Windows 2003 with 5.2 (stable)! (See my previous comment for details)
 [2006-11-08 21:15 UTC] coder1 at gmail dot com
open - issue still exists.
 [2006-11-10 16:24 UTC] dmitry@php.net
This is not a PHP but isapi_fcgi.dll fault.

From quick look into source code fcgi_server.c:373 I see a buffer overflow.

            contentLength = (Header.contentLengthB1 << 8) + 
Header.contentLengthB0;// + Header.paddingLength;
            rcvd = OS_Read(req_info->appServerSock,
(char *)&work_buffer, contentLength + Header.paddingLength);

work_buffer is declared as "char work_buffer[8192]" so in case if packet length is larger then 8192 bytes isapi_fcgi.dll makes fault. According to FastCGI specification it is legal to use packets up to 65535 bytes, so this is definitely isapi_fcg.dll's problem.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 18 10:01:27 2024 UTC