php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #12700 502 Gateway Error/Failed to Return Headers
Submitted: 2001-08-11 12:40 UTC Modified: 2002-06-18 18:44 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: paul dot burden at kingproducts dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.1.1 OS: Windows 2000 Server
Private report: No CVE-ID: None
 [2001-08-11 12:40 UTC] paul dot burden at kingproducts dot com
I have installed and setup 4 different Windows 2000 Server Pro/Advanced machines with IIS, PHP 4.0.6, MSSQL Server 2000 and 7. All systems have variations in hardware configurations and performance, all of the systems have this identical problem. 

In the last 5 days there have been around 2000 site hits. IIS has logged 24 occurrences of a 504 Gateway error. And returns "CGI Failed to return headers". This error is *very* random. Out of the 35 .php documents, the error has occurred on 6. These 6 are also the most frequently requested documents on the server.

These documents are otherwise error free. 

Its not too hard to recreate the error. Several repeated requests of the same document that performs database requests will generate the error.

To me, it seems *completely* random. I have setup IIS to point to a document that causes a page refresh on a 502 error. The refresh action re-posts the page and the page will display correctly. 

This is a critical problem for me.  I have modified the IIS 502 error report document reload and resubmit the page that generated the error.

The only way I can re-create the crash is by hitting the same page "UserDetail.php" 10 times in 10 seconds. The 10th request generated a "502 gateway error". NOTE: Crash still happens during normal activity as well.

IIS Logs:

200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0)
2001-07-11 19:25:17 205.150.207.2 - 205.150.207.20 80 GET
/directory/UserDetail.php
SID=f2b31876e1822c10425ea4e1d13c01f3&FriendStatusChange=1&UserToView=5&Search=3
200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0)
2001-07-11 19:25:18 205.150.207.2 - 205.150.207.20 80 GET
/directory/UserDetail.php
SID=f2b31876e1822c10425ea4e1d13c01f3&FriendStatusChange=1&UserToView=5&Search=3
200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0)
2001-07-11 19:25:18 205.150.207.2 - 205.150.207.20 80 GET
/directory/UserDetail.php
SID=f2b31876e1822c10425ea4e1d13c01f3&FriendStatusChange=1&UserToView=5&Search=3
200 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0)
2001-07-11 19:25:18 205.150.207.2 - 205.150.207.20 80 GET
/directory/UserDetail.php
SID=f2b31876e1822c10425ea4e1d13c01f3&FriendStatusChange=1&UserToView=5&Search=3
502 Mozilla/4.0+(compatible;+MSIE+5.5;+Windows+NT+4.0)

^^ note the 502 "Gateway error in the last line of the log.

no backtrace, you have no instructions on how to capture this in win32?


Thanks for your attention,

- Paul

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-08-13 13:02 UTC] paul dot burden at kingproducts dot com
Apologies,

After further searching though your bug database this appears to be a duplicate of #12562 and possibly #11788/#9852.

I would like to stress this is a serious issue for me.

Thanks,

- Paul.
 [2002-01-11 17:39 UTC] paulburden at kingproducts dot com
FYI, This is still an issue with 4.1.1
 [2002-05-28 04:41 UTC] theo dot schoeberl at tssystems dot de
We have the same problem running 4.0.6 (W2K Server, IIS5).

Is there anybody working on this problem?
 [2002-06-07 10:50 UTC] k.schroeder@php.net
Should be the same as #9852. IMHO this is a bug in IIS. I have the same errors using Perl or ASP.
 [2002-06-18 18:44 UTC] sniper@php.net
See bug #9852.

 [2002-10-23 16:24 UTC] egarcia at artech dot com dot uy
Hi,
 I have the same problem and searching information I found your comments.
 I have a web application (CGI) developed in Visual Studio C++ (ansi C) and I run this on IIS 5.0 and windows 2000 Server SP3.
Sometimes, when I use the application the follow error apears: HTTP 502 Bad Gateway and then when I make a new Refresh in the browser it disappears.
The exact message error is: 
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

And I found this in Microsoft: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q145661

and this in another site  http://intsys.fin.qub.ac.uk/amzi/webls/iis_cgi_problem.txt

I hope that this information could help you.

Regards,
   Eugenio
 [2003-03-03 17:16 UTC] gkasten at filnet dot fr
Hello bugbrowsers,

I tried too unsuccessfully : -background perf -mdac -admin and various other commented things, on IIS w2kSrv & NT4 :-( 

I had the problem on /phpmyadmin subdir, protected by ACLs.
And only with far-tracerouted client machines.

*I SUCCEEDED with unchecking "directory-security / allow-anonymous-access" (which is theorically useless because there is no IUSR_* in the acls of php pages below).

I hope it can help desperate hostmasters, and php-dev-community to track this @#%! bug.

Guy Kastenbaum - Paris
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 10:01:29 2024 UTC