FastCGI Max Instance creating performance issue on IIS8RSS

1 reply

Last post May 04, 2015 07:24 PM by LordInfidel

  • FastCGI Max Instance creating performance issue on IIS8

    Mar 17, 2015 10:45 AM|LordInfidel|LINK

    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.  Resources are 32gigs memory, 2 quad 2.86ghz procs, 15K HDDs.

    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).

    I also have boncode logging enabled so I can see each time the cf page is hit.   Failed request tracing is also enabled.

    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.   Almost like it unjars something.  

    You can go from 32 to 0, 16 to 19, 0 to 1, does not matter; all that matters is that the number changes.

    The issue is present with and without wincache enabled, and it is present across 5.2.x, 5.3.x, 5.5.x and 5.6.x (32 and 64 bit)  versions of php.

    I'm kind of at a loss of where to look at this point, so anything is on the table.

    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 (-;

    We are not yet ready to make the plunge to 5.5 or 5.6 but as I alluded to, as a test I did change it to the various versions with the same result.

    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 script on its own non-railo site, created a new classic mode app pool, and it was still slow.   Changed the app pool to integrated and it was still slow, thus this eliminated any railo interaction.
    - 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
    - Upgraded php to higher versions and 64bit, same result.
    - Tried editing the php.ini file on the fly, it did not produce the same result as changing max instance from within fastcgi
    - It occurs with or without wincache loaded

    - When I change the fastcgi max instance, the per line ingestion rate goes from 1000+ms to 3-5ms.

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

    Thoughts and thanks in advance

    fastcgi slow iis8 maxinstance

  • Re: FastCGI Max Instance creating performance issue on IIS8

    May 04, 2015 07:24 PM|LordInfidel|LINK


    Okay you FastCGI thread followers, here is the final update.

    What I have learned (from very reliable non-Microsoft resources), is that FastCGI is NO LONGER OFFICIALLY MAINTAINED.   So, if it is your bottleneck on IIS8, don't bother trying to live it with, bypass it.

    There is NOTHING that Microsoft will be able to do to help you.  Sure you can open up a support ticket and they will do everything in their power to grind you down blaming it on anything else other than their port of FastCGI.

    With that said, we bit the bullet, re-wrote the script completely in coldfusion so that it does not have to go thru FastCGI, and now it runs in under 5 minutes, the way it should.

    But hey, feel free to leave any comments if you so choose.

    fastcgi slow iis8 maxinstance