IIS 7 and Above
Intermittent 500 error Windows server 2008 x64
Last post Jun 01, 2010 08:03 PM by Luis Angel Martínez Cancelo
May 29, 2010 12:52 PM|Luis Angel Martínez Cancelo|LINK
We are running several php websites in 2008 x64 and they apparently work fine. However sometimes we have interminttent 500 error. With the trace logging we can see that the error is because "Fastcgi exited unpexpectedly" Each site has its own applicaction
pool and we have tried to set it at 32 bit mode however the problem persist randomly.
We have two servers with 2008 r2 x64 and the error happens in both. In the one we use to test, we have proved to update php from 5.2. to 5.3 and the problem persists. The problem is more frecuent with php 5.2 than 5.3 However with 5.2 when you press F5 the
website reloads instantly and it takes longer with 5.3.
May 29, 2010 02:19 PM|don.raman|LINK
FastCGI process exited unexpectedly means that your php-cgi.exe process crashed or was terminated abruptly. Did you check Windows Event Viewer? It should show Application Error for php-cgi.exe. See which DLL is creating the fault. The crash might be happening
because of a bug in PHP or one of it's extension (event viewer details will tell you that) or because of a bug in your PHP application (chances are rare as the error is intermittent). In both the cases stack trace or a core dump will be needed to fix it.
However first step is to figure out which DLL is causing the fault.
I believe PHP5.3 is taking longer time because of database host name resolution. But this is just a guess and would like to know more if this is case indeed. If this is the case please replace database host name from localhost to actual IP address and test
Network Monitor is another great tool from Microsoft to debug this further if the problem is related to network.
May 30, 2010 06:37 AM|Luis Angel Martínez Cancelo|LINK
Thanks for your fast answer
Yes, I checked event viewer but very few times register an event.
For example at one of the server with php 5.2.6 the few times that an event is registered may be one of the following: error
Aplicación con errores php-cgi.exe, versión 184.108.40.206, marca de hora 0x481b8f5f, módulo con errores phpexpress-php-5.2.dll, versión 220.127.116.114, marca de tiempo 0x489c6951, código de excepción 0xc0000005, desplazamiento con errores 0x00014d80, Id. de proceso
0x1d1c, hora de inicio de la aplicación 0x01caf8bb9abad9f0.
Aplicación con errores php-cgi.exe, versión 18.104.22.168, marca de hora 0x481b8f5f, módulo con errores msvcrt.dll, versión 7.0.6002.18005, marca de tiempo 0x49e0379e, código de excepción 0xc0000005, desplazamiento con errores 0x0006314c, Id. de proceso 0x1ed0,
hora de inicio de la aplicación 0x01caed30cfb7c3c1.
The trace when the error produces:
The error produce intermittent at diferente web sites with different program and the most curious thing is that it produces in both servers, test server at intranet and production server at internet and both servers have server 2008 x64 that is the reason
because I think it can be related with x64.
We are going to probe network monitor as you sugget and we are going to intall a x86 server 2008 to prove.
May 30, 2010 03:35 PM|don.raman|LINK
Event viewer does indicate that PHP is crashing as well as something like PHP Express (not sure what is that). If this is some kind of extension, you can try disabling it.
Jun 01, 2010 08:03 PM|Luis Angel Martínez Cancelo|LINK
PhpExpress is NuSphere PHP accelerator that provides support for loading of PHP files encoded with Nu-Coder - NuSphere PHP Encoder
We use this extension because some of our client web pages are encoded with this extension. Now we are proving in our test server to disable this extension to check if 500 error dissapear in the web sites which don´t use this extension.