Quantcast
Channel: FastCGI Module
Viewing all 205 articles
Browse latest View live

Many php-cgi.exe processes

$
0
0

Hello.

Since a day or 2, my webserver running Windows Server 2012 R2 with IIS 8.5 spawns a large amount of php-cgi.exe processes.
The PHP version is 5.6.3 and has been updated since its release on windows.php.net and working great, until ~2 days ago.

Where it used to spawn about 5~6 of these processes before, it now opens 200+ sometimes and makes my opening a webpage on my server slow and sometimes even blocking access to RDP.
When using ''iisreset /restart'', the processes disappear, but not for long, it graduatly builds up again.

Not always will the webserver respond slow.
I have the settings at the default settings in the FastCGI Settings.
0 Max Instances, and 10000 of Instance Max. Requests (10000 for recycle also)

But interestingly these settings haven't been changed at all. They were the same before the problem started happening.
I have tried to lower the Instance Max. Requests and increasing the Max. Instances (but resulted in that the website sometimes stops responding at all, not even an HTTP error but just a time-out).


It isn't the PHP version itself, since I have installed via backup 5.5 and 5.4, and with them it also happens.

Is there some other settings that is causing it?
I don't want to do a iisreset /restart every 6 hours or so (have scheduled it for 01:00 each day) or reinstall the machine, since it means my website is offline for at least a day.

Could anyone help me?
If you need further information, please tell what you need.


PHP Startup: Unable to load dynamic library php_pdo_firebird.dll

$
0
0

Hi,

Installed php 5.6 NTS VC11 and php is working. I seem to be unable to load pdo extensions php_pdo_firebird.dll and php_interbase.dll other extensions are being loaded so the extension dit setting in php.ini is correct. The php error log shows the following but the modules are in the correct place.

[13-Jan-2015 13:47:35 Europe/Belgrade] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\php56\ext\php_interbase.dll' - Kan opgegeven module niet vinden.
 in Unknown on line 0
[13-Jan-2015 13:47:35 Europe/Belgrade] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\php56\ext\php_pdo_firebird.dll' - Kan opgegeven module niet vinden.
 in Unknown on line 0

I'm also reading something about placing a fbclient.dll in de php dir but i'm not sure.

App pool Model Process / FastCGI

$
0
0

Good Evening,

Between theapplication pool -Process Model(idle time-out)andfastcgi application (ActivityTimeout), what is the difference?Andwho wins?

What would bethe behavior of ascript withthe following values:

Assumeyouareuploadingafile ofsize 'X'It Takes500MB andsecondto uploadit (AssumingPHPis configuredtoallow justeuploadof filesandso thesizeof 'X'estMBallowed)andbelow-you-havevalue forthe timeouts:

idle time-out(pool)= 1
ActivityTimeout(FastCGI)=501
RequestTimeout(FastCGI)=501

The scriptworks or not.

Despitea lot of reading,I do not finda clear answer on this.

This is theapplication pool (w3wp.exe) that createsthe php-cgi.exeprocesswith the values of theapplication poolprocessmodel?

There are twoprocess model inthe pooland fastcgiapplication ...
I'm lost :)

thank you

FastCGI process has failed recently- IIS 7.5

$
0
0

We have a Windows 2008 R2 server with IIS 7.5. We have hosted WordPress website on it.

The website shows 500 internal error frequently. On enabling the detail mode, it gave the following message :

HTTP Error 500.0 - Internal Server Error The FastCGI process has failed frequently recently. Try the request again in a while.

Reseting the server starts the website.

The issue has been quite often and we are unable to find any further information regarding the cause. Neither we are able to replicate the issue.

We have enabled sysloging in php.ini but to no avail.

Please provide a solution to diagnose the cause and resolve the issue.

Thanks in advance.

No REQUEST_URI in PHP under IIS 8.5 FastCGI

$
0
0

Hi there,

  I'm trying to evaluate a PHP setup under IIS 8.5 (which seems to be all that's available on Windows 8.1), it's...tricky.

  It seems like it's almost there, but I can't get anything from $_SERVER['REQUEST_URI'] (apart from by hacking in PHP), it's always empty. I've seen this, in relation to IIS 7/7.5:

http://support.microsoft.com/kb/2277918

but I don't know how I could actually get my hands on that hotfix (or if it would work on 8.5)?

  Can anyone help?

  Thanks,

Toby

php pdo drivers won't load on Windows Server 2008 using IIS Fast-CGI

$
0
0

I'm not positive where this goes because I'm not 100% certain what is causing this fail.  I've been working on this issue for weeks now and I'm certain I've become notorious in forums at this point.

Background: I'm attempting to run a php based application that should connect to a database on a Windows Server (2008) through IIS using FastCGI module. The database works great and I was able to get php to work but when I go to pull data from the database using the application I get "could not find driver 1".

All of my other php code works fine, it's just when I call pdo.

I've only been able to find a few posts regarding this issue most of them were solved by installing MS Visual Studio.  So I installed that, reset the IIS then tried resetting the server.  Still no dice.

I have these extensions uncommented in php.ini

PHP.INI (uncommented extensions)
xtension=php_bz2.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_pdo_odbc.dll
extension=php_pdo_sqlite.dll
extension=php_sqlsrv_55_nts.dll
extension=php_pdo_sqlsrv_55_nts.dll

all of these .dll files have been included in my php/ext folder

I've also read a few how-tos and forums on the Microsoft site and have made sure that the following is set up in my php.ini file:

open_basedir = "C:/inetpub/wwwroot/;C:/Inetpub/temp;C:/WINDOWS/TEMP/"
extension_dir = "./ext"
cgi.force_redirect = 0
cgi.fix_pathinfo=1
fastcgi.impersonate = 1
fastcgi.logging = 0

I have a copy of php.ini in the PHP folder and an exact copy in the Windows folder as well since "Configuration File (php.ini) Path" is "C:\Windows".

In PHPInfo()

Server API = CGI/FastCGI
PHP Extension Build = API20131226,NTS,VC11
PHP Version = 5.6.4
upload_tmp_dir shows the correct extensions that should be loaded
PDO drivers = "No Value"

I don't understand why PDO drivers shows up as not found.

On the IIS Manager I have PHP - FastCGI set up in Handler Mappings according to the Microsoft How-To.  Should I be using CGI module rather than FastCGI or am I missing something?

I also don't see PHP in the registry under HKEY_LOCAL_MACHINE/SOFTWARE.  I've read that tells Windows where to look for the php.ini file but I'm not sure what that is supposed to look like so I don't want to try to build it manually and mess something up.

I did, however, add the php folder to the environment variables in Path, so I'm not sure if the lack of PHP directory in the HKEY_LOCAL_MACHINE/SOFTWARE is the problem or not.

environmentVariables ignored by FastCGI application

$
0
0

I need to use an environment variable to configure MapServer (http://mapserver.org/) a C program that can run as a FastCGI application in IIS.

The code uses the C getenv function to get this variable.

const char *pszCurlCABundle = NULL;
pszCurlCABundle = getenv("CURL_CA_BUNDLE");

I have set the System Environment variable in Windows and rebooted. However the variable is always null. If I run the same program from the command line the environment variable is picked up correctly.

As I understand it the FastCGI environment differs from the standard one. I have tried to configure this using IIS and applicationHost.config, but again no effect. I've tried the following at applicationHost.config and web.config levels:

<fastCgi><application fullPath="C:\Mapserver\bin\mapserv.exe"><environmentVariables><environmentVariable name="CURL_CA_BUNDLE" value="C:\Mapserver\bin\curl\curl-ca-bundle.crt" /></environmentVariables></application></fastCgi>

It seems all environment variables are null including CURL_CA_BUNDLE and path:

  test1 = getenv("Path");
  msDebug("Path=%s\n", test1); // Path=(null) 

Is this an issue with IIS, and is there anyway to set up the environment so these variables are picked up? I have tried on Windows7 and Windows Server 2008 R2, IIS 7 and IIS 7.5.7600 respectively

How can I pass command line arguments to my fastcgi process?

$
0
0

I have created a Visual C++ app called fastcgi.exe and I want to use this with the IIS 7.5.7600.16385 FastCgiModule.

If I use IIS Manager to create a handler mapping using FastCgiModule, specifying this executable, then IIS Manager also automatically creates a corresponding entry in FastCGI settings. All I have to do then is set the protocol for the latter to Tcp and everything works. My fastcgi.exe receives requests and sends responses that I see in my Web browser.

Now I want to pass an argument to fastcgi.exe on its command line (because my exe is actually a script processor and the fastcgi processing is done by this script - currently the script path is hard-coded but I want this choice of script to be part of the configuration of my IIS website). The FastCGI settings entry has a property for command line arguments, but I cannot change it once the entry has been created - it appears to be part of the key. I have tried various approaches:

1. If I add command line arguments to the path I select when creating a handler mapping, the FastCGI setting entry created by IIS Manager includes these in the path, not in the arguments property. In the browser, I see

HTTP Error 500.0 - Internal Server Error

The FastCGI executable could not be found

Moreover, I cannot then edit this FastCGI setting entry in IIS Manager because it complains it is not a .exe.

2. If I create the handler specifying just the executable, then manually create a FastCGI settings entry with the same executable, but adding an argument (which you can only do at the time the entry is created) then in the browser I see:

HTTP Error 500.0 - Internal Server Error

<handler> scriptProcessor could not be found in <fastCGI> application configuration

This is the point I made above about the arguments perhaps being part of the key used to match a handler to a fastCGI application.

3. If I set up a working configuration using just the exe paths, then use appcmd to set the argument property of the entry in the fastCGI section (not possible using IIS Manager as noted above) then I get the same error as in 2 above.

I will probably instead try to use an environment variable to pass the script to my fastcgi.exe, but nevertheless it is frustrating that there is a way to specify a command line argument but that this does not actually seem to be workable in any configuration I have tried.


Binding a website to new FastCGI settings results in internal server error (500)

$
0
0

Hi all,

What I try to do
Configure 1 website to execute long running (up to 5 minutes) php scripts, by adjusting FastCGI's "ActivityTimeout" setting. I do not want to enable this setting for all websites by adjusting the normal FastCGI application settings, but I want to create a new FastCGI application where I can map that one website to.

How I tried to do that
According to this site I can create different FastCGI applications for different websites. The unique identifier for a FastCGI application is the combination of the executable and the arguments. The steps I took:

  • Creating a new FastCGI application with the settings:
    • executable: "E:\Program Files\PHP\php-cgi.exe"
    • arguments: "long_process" PHP actually does not do anything with this, except passing it as arguments to the php script, where they appear in the
      $argv[] array. See this php manual
    • Setting the application´s ActivityTimeout to a few minutes
  • <div>Adding a *.php module mapping in the hander mappings from that one specific website with the settings:</div>
    • Module: FastCgiModule
    • Request path: *.php
    • Executable: "E:\Program Files\PHP\php-cgi.exe"|long_process
    • Restrictions: file&folder, all verbs, script

The problemIIS outputs an Internal Server Error (500):

HTTP Error 500.0 - Internal Server Error<handler> scriptProcessor could not be found in <fastCGI> application configuration

Detailed Error Information
Module: FastCgiModule
Notification: ExecuteRequestHandler
Handler: PHP_Fast_CGI_Mapping
Error Code: 0x80070585

No matter what I try, which arguments (also more 'valid' php commandline arguments, such as simply -v to display the version or -d open_basedir <path> to define the basedir), the outcome is always the same. The problem looks a lot like this forum post: How can I pass command line arguments to my fastcgi process?

Does anybody have an idea what to do?
Thanks in advance!

FastCGI on IIS8, Max Instances creating performance issue that can be corrected on the fly

$
0
0

Has anyone seen this issue (maybe not exact but similar that may have some insight)?

Before I describe it, Starters: My environment is Server 2012 R2 IIS8 64 Bit, running php version 5.3.28 NTS  VC9 along with Railo 4 and tons of resources (2 quad cores/2.86ghz and 64 gigs/mem) 

I have a php script that reads in a 2meg file and loops thru it, reading in line by line.  On each line it calls a coldfusion file which in turn updates the db (the calls to CF is clocking in in the 2-5ms range.  During the loop process, it goes painfully slow where IIS thinks it is taking 1000ms (verified in the IIS logs under time taken).    If left untouched, the process takes over an hour and never finishes.

One would automatically think it is the PHP script or the CF files, but after days of tinkering I can say its not (I'm not a developer nor did I write the code; and I do wish it was the code as it would save me heartache of trying to fix the process)

If your familiar with running Railo on IIS, it uses a interpreter called Boncode, which I have boncode logging enabled so I can see each time the cf page is hit in real time, and watch the log file increment in size.   Needless to say, I have all sorts of logging going on in just about every imaginable module.

Now, here is where it gets interesting:  If, while in the loop and it is going painfully slow, I go into fastgci in IIS, and change the Max. Instances from whatever number it is (lets say 1) and change it to an arbirtrary number (lets say 32), it immediately kicks in and goes very fast (lightning fast, the way it should be).   Almost like it unjars something within the fastcgi module.

What is even freakier, You can go from 32 to 0, 16 to 19, 0 to 1, does not matter; all that matters is that the number changes.   And it does not matter at what point the processing is occurring.   I can wait 10 seconds and change it, then it will go fast.   Or I can wait 5 minutes, change it and it will go fast.

Originally I thought it was because of wincache, but the issue is present with and without wincache enabled, and it is present across 5.2.x , 5.3.x, 5.5 and 5.6 versions of php.

 I'm kind of at a loss of where to look at this point, so anything is on the table.   Its clearly something with the FastCGI module on IIS8; if it wasn't then the max instance change would have no effect on the process, but it is the only thing that I can change that will have any impact (immediate or latent).

What is even weirder, if I change it from 1 to 0 on the fly and the process ends properly; if I re-run the same exact process , using the same import file, within seconds and without changing anything, it is slow again.   But if I change it from 0 to 1, immediately it goes fast.

 And yes, this script/functionality was working fine without issue under server 2003 for close to a decade; this was the last server in a very large migration, so please no jeers (-;  ... I fact I can take the same exact php version (moving the entire php folder with extensions and ini file, move it onto the old server), take the same exact php file and the files to be processed; run it on the older server (2003/IIS6), and it runs just fine.

Other info
=======
- Site running the php script is in its own app pool
-  That app pool is configured to run 32 bit apps
- Can't run that app pool in classic mode because of railo.
- I tried putting the PHP page on its own non-railo site, created a new classic mode app pool, and it was still slow and followed the same "max instance" change
- There are no php errors being logged
- In the fastcgi mappings, I increased the max requests to 10000 and matched it with the env var PHP_FCGI_MAX_REQUESTS
- It is PHP version agnostic; tried 5.2, 5.3, 5.5, 5.6 (32 and 64 bit) , same results

 No matter what combination I try, the one constant is still the same; change the max instances on the fly (no recycling of the app pool) and it magically starts going fast.

Thoughts and thanks in advance

Mike

PHP requests and timeouts

$
0
0

I have a website that I need to set low execution times for.  Some of the php pages on the site run for longer than 10 minutes and I'd like to have them timeout at 2 minutes.

- I've set max_execution_time to 120 seconds via the php.ini, verified the setting took via phpinfo file I created.
- set the CGI setting from 15 minutes to 2 minutes
- set the "Request Timeout" setting under the FastCGI application settings for the PHP version I am running to 120 seconds

Even after an IIS reset none of these settings seem to cause a request to timeout in with the values I've set. 

Any tips? 

Thanks!

Secure cookies

$
0
0

I have an application running with PHP 5.6.6 and IIS7.5. Security scans are flagging this as being a high vulnerability:

[-] Testing for cookies without the secure flag ...
Set-Cookie: PHPSESSID=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0
Set-Cookie: PHPSESSID=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/

Is this indeed a security concern? I have managed to configure the cookie that goes to the browser as secure and with the httponly flag.

IIS8/FastCGI/perl+COM

$
0
0

I've got IIS8 working with fastcgi & perl in general, but when my test perl script tries to use Win32::OLE to create a COM object, the weirdness begins in earnest. If I run the perl script in a cmd.exe window, it works fine. The script attempts to create two different COM objects:

  • Scripting.FileSystemObject
  • Clearquest.session

Again, from cmd.exe window it works fine. The user account I'm using is in the local administrators group. The same user is being used for the DefaultAppPool, so I'm pretty sure it's not security related. Here's what's weird: creating the COM object when the script executes in the fastcgi context fails with 0x800401f3 'Invalid class string'. So, I built a debug version of the Win32::OLE perl module & stuck a whole bunch of debugging messages in it. The call to CLSIDFromProgID is the culprit. Same object, works in one context and not the other. So, I fired up procmon to see what I could find there. This turned up a 'CreateFile' from perl.exe on 'C:\perl\bin\%systemroot%\Registration\R000000000012.clb', which clearly fails with 'PATH NOT FOUND'. Just for grins, I created a symlink in c:\perl\bin named '%systemroot%'. With that in place, creating the 'Scripting.FileSystemObject' object actually works, but not the 'clearquest.session'. 

So, my general question is: what is different between the context of running from a command window vs. under IIS's fastcgi module that would cause this behavior and is there anything I can do to alter it?

Thanks,

Russ

EDIT:

  A few items I forgot to mention:

  • this happens with several different versions of perl, e.g. activestate 5.14, 5.16 & 5.20, strawberryperl 5.20
  • the %systemroot% symlink goes to c:\windows
  • it works OK as CGI rather than fastcgi, but the startup & login cost of the clearquest.session object is quite high, so I'd rather not use CGI
  • this is a porting project from apache 2.0/mod_perl on windows
  • the test perl script is only using Scripting.FileSystemObject for comparison. The clearquest.session object is the one I really need.
  • wrapping the handler with a cmd.exe /c (32 or 64 bit versions) fails spectacularly
  • the perl version in all cases is 32-bit
  • the app pool is 32-bit enabled
  • the app pool .Net Framework Version is set to 'No Managed Code'. This was originally v4.0. Changing had no effect (as I expected it wouldn't)

Multiple PHP versions and IIS Express

$
0
0

On my system, I am running WebMatrix 3 with IIS Express 8. I have PHP 5.6.0 and PHP 5.3.28 installed on the system.

I have built a Website called Mysite.

When I go to IIS Manager and start PHP Manager, it tells me that the Web site is running PHP 5.6.0 and gives me the appropriate phpinfo() output.

However, when I add a phpinfo() call on my website, it tells me that it is running PHP 5.3.28.

When I go to WebMatrix manager in the system tray, it shows me the config file applicationhost.config. When I look at it in the editor, it shows my PHP 5.3.

I don't want to manually edit config files if possible, but willing to do it if needed.

How do I switch my website to PHP 5.6? The standard articles on the web did not work.

IIS 7.5 Modx and spawning of php-cgi.exe processes

$
0
0

I have modx running on a Windows 2008 R2 webserver running IIS 7.5.  Everything was running great for about 2 months then we started having issues.  All of the modx related sites would be hung.  To get the sites going again I have to stop, pause briefly, then restart the modx application pool.  In monitoring task manager, I would notice that there would be many php-cgi.exe processes associated with the modx application pool before restarting the app pool.  It is the only site that uses that application pool.

We have other php sites and they are unaffected by the issue but it hangs all of the modx sites (5 sites + management console).  The issue started about the time some new development work started. Coincidentally we also applied Windows Patches a day or two before the issue started happening - but I could find no info on the patches that indicated any connection with the issue I am experiencing.  

I myself have caused a crash by doing several small edits and saves in the modx console in a short period of time.  We added 4 gb to the server and that helped a lot but today it hung multiple times.  We added another 4 GB but 16GB seems like a lot of memory for a web server.  (running on VMware)  There are 31 iis sites (including FTP sites).  50-80 current connections is a normal load. 

The site hangs most often when someone is in the modx management console but there are a few known occasions where I have checked all known developers and can find no one using it at the time the site crashed.  I have a program that emails me when it can't ping the site - so I know relatively quickly when it does crash.  I have tried setting recycle settings on the site but have not been able to hit upon a combination of settings that recycles when all these processes get spawned.

I found a similar post for someone running a newer version of php then us.  But the suggestions in it were not helpful.http://forums.iis.net/t/1220426.aspx?Many+php+cgi+exe+processes   My developer has indicated that later versions of php are notstable for modx on Windows so upgrading PHP versions doesn't appear to be an option for me. 

PHP version: 5.4
Modx version: 2.2.15-pl (traditional)
IIS 7.5
Windows Server 2008R2 SP1


Function Sleep and speed limit download

$
0
0

Hello!

I Russian, sorry for my bad English! Smile

My PHP-script get files, but I need speed limit to download.
For this I use sleep() function. But I have a bad effect!
When the download starts
1) Browser tab going for a long time (from 30 seconds to 1 minute)
2) Loading begins at the right speed
3) Download suited to a specific point* and stops
4) The browser reports a problem with the connection

*specific point - multiple of the value of the variable$download_rate (limiting speed). See code. If $download_rate = 100, download stoped on 10 Mb of file, if 50 - 5 Mb...

This problem is only on IIS, Apache all right! Frown Withoutsleepallrighttoo!

PHP-code:

<?php$file = 'video.avi';
set_time_limit(0);
ob_end_clean();$download_rate = 100; // speed limit kb/s$fd = fopen($file, 'rb'); // Open file from read

// HTTP-headers code... (cut)

while (!feof($fd))
{ 
print fread($fd, $download_rate * 1024); // read block file ang out

sleep(1); // sleep 1 second
}

fclose($fd);
exit;
?>

Technical information:

Web-Server: IIS 7.5

OS: Windows Server 2008 R2 x64 SP1

PHP: v5.6.9 Win32 VC11 x64

Browser: not important

Please, Help me!

Installing PHP on IIS 8.0

$
0
0

Here is what my situation is:
I have installed WebMatrix 3 from Web PI. From Web PI only when I try to download PHP 5.4.14 it stucks on 0. So I downloaded it manually. Now I have a PHP zip file (which I extracted at C:\PHP). I also have Visual Studio Express 2013 for Web. Visual Studio do not have PHP support (for free), WebMatrix has so I want to use Visual Studio for normal development and WebMatrix for PHP stuff. For PHP to run, I have to install it on IIS Express 8.0 that I got along with WebMatrix installation. What will be my steps to install PHP? Also, if you can help me with WebMatrix and Visual Studio problem then please suggest me something.

FastCGI 500

$
0
0

Hi!

A'm relocating my PHP app to the new server. I got the error 500. Tracing img is below, please help.

115.-FASTCGI_START<div id="section_detail_115_details"></div>
<div class="duration">0 ms</div> <div class="severity-verbose">Verbose</div>116. -FASTCGI_WAITING_FOR_RESPONSE<div id="section_detail_116_details"></div>
<div class="duration">234 ms</div> <div class="severity-error">Error</div>117. -FASTCGI_UNEXPECTED_EXIT<div id="section_detail_117_details"></div>
<div class="duration">0 ms</div> <div class="severity-warning">Warning</div>118. -SET_RESPONSE_ERROR_DESCRIPTION<div id="section_detail_118_details">
ErrorDescriptionC:\Program Files (x86)\PHP\v5.6\php-cgi.exe - The FastCGI process exited unexpectedly
</div>
<div class="duration">0 ms</div> <div class="severity-warning">Warning</div>119. -MODULE_SET_RESPONSE_ERROR_STATUS<div id="section_detail_119_details">
ModuleNameFastCgiModule
NotificationEXECUTE_REQUEST_HANDLER
HttpStatus500
HttpReasonInternal Server Error
HttpSubStatus0
ErrorCodeThe extended attributes are inconsistent. (0xff)
</div>
ModuleNameFastCgiModule
NotificationEXECUTE_REQUEST_HANDLER
HttpStatus500
HttpReasonInternal Server Error
HttpSubStatus0
ErrorCodeThe extended attributes are inconsistent. (0xff)
ConfigExceptionInfo

No way to end connection with User

$
0
0

Please, get in touch with the MS-PHP Core contributors and implement something similar to this:

http://php.net/manual/es/function.fastcgi-finish-request.php

Most modern frameworks rely on registering shutdown functions or similar, and IIS/FastCGI/PHP will keep the connection open (and not deliver the response until then) making them run like a snail.

The only way that FastCGI will actually end connection with the user is to send the Content-Length header, followed by content of such length. That is a nasty workaround that all these CMS do not implement, and that is not feasible to implement with modern web rendering strategies such as Big Pipe where you start streaming to the client the content of the page without knowing how much content are you actually going to send.

PHP failing on IIS

$
0
0

I am up against an issue whereby PHP is failing in a way that leaves the php-cgi.exe processes running, but they no longer take requests. The maxInstances of PHP is consumed and requests result in an HTTP 500 error.  When this condition occurs, I will begin seeing very long request times in the IIS log (in the order of minutes) and then eventually all requests immediately result in a 500 error.  The Failed Request Tracing logs capture the following errors during the sequence: FASTCGI_REQUEST_TIMEOUT, then FASTCGI_RAPID_FAILURE_PROTECTION, and finally FASTCGI_APPLICATION_MANAGER_SHUTDOWN.   Resetting IIS temporarily resolves the issue. Any insight would be greatly appreciated.

Relevant PHP settings are as follows:

PHP version 5.6.12

maxInstances = 30 (we have 4 cpu)

intanceMaxRequests = 1000

PHP_FCGI_MAX_REQUESTS = 1000

Viewing all 205 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>