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.
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.
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 and 5.3.x 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.
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 page on its own non-railo site, created a new classic mode app pool, and it was still slow.
- 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
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