IIS 7 and Above
IIS 7 w/ PHP Fast CGI running slow.
Last post May 27, 2011 11:04 AM by HCamper
Apr 24, 2011 03:16 PM|leonardoturtle|LINK
multiple sites running slow
iis 7 with fast cgi running slow
Apr 25, 2011 07:49 AM|abadincrotch|LINK
1) Are all service packs/updates/hotfixes installed?
2) Are you running 2008 x64? Are you running this as a 32-bit app pool?
3) i3 CPU is simply not a server-class processor. I would hardly even rely on that as a development machine for more than 2-3 people, much less a production server. I would also wonder about disk performance.
4) If the machine using TCP offloading?
5) What does memory usage look like? Do you have an app pool for each site, are they shared, etc.? If running x64, I'd add more RAM.
6) You can try enabling multiple threads for the app pool worker process, as long as your code doesn't display any node affinity -- if you're not relying on local session state or similar on the server, you can use multiple threads. It's like a mini web
farm on a single server, using more threads to maximize the value of multi-cores.
7) If you haven't already, consider using the compression features of IIS to improve content compression. Also, consider caching strategies.
Apr 25, 2011 11:33 AM|HCamper|LINK
Could you provide more information for "Currently two of our sites on our server is extremely bogged down.".
What kind of code or operations are at the "sites on our server that are bogged down"?
If the code is mostly PHP:
A) For the PHP installation is it the Non-Thread Safe Version ?
B) You may improve operation for PHP by upgrading to latest version.
There have been security updates / engine updates / code fixes since the version 5.2.14 was released.
C) I suggest you check the PHP for Windows site and download the latest release for PHP Engine non-thread-safe version.
You can save time when updating PHP engine by copying current php.ini,pear.ini files to safe location
before install of latested PHP installer.
You then can use the saved ini file settings to speed up the installation post configuration and testing.
D) There have been recent updates to Wincache Extension that may have impact for performance.
I suggest you get latest developer release for Wincache at the Source Forge current dev release is 1.2.
If you clarify what your code is doing would be of help.
Apr 25, 2011 02:32 PM|leonardoturtle|LINK
1) I have service pack 2 and I just recently did a full update.
2) Running a 32-bit app pool
4) I am not familiar with TCP offloading so I am assuming that is a no. If you can point me to some good references I will do my research on that.
5) Memory usages is at a safe zone. 40-60% of 4 GB memory usage. CPU is running very high 90-100%.
6) I will look into enabling multiple threads but at the current state of my system running at 100% I think it will break the system.
Currently, I have the fast-cgi maximum instances set at 0 where it will automatically decide the optimal number for me. BUT once I set this it seems to create many sql connections that mysql server cannot handle. About 30% of the time connecting to the
site I get a "Can't connect to SQL" message.
Also I am considering on changing my mysql engine to Innob instead of MyISAM. My thinking is the locking of tables when updating could be a reason of the bottleneck.
Thank you for the guidance. If you can shed anymore light on this matter it would be great!
Apr 25, 2011 02:45 PM|leonardoturtle|LINK
Thanks for replying to my thread.
The code is mainly PHP and I am running a separate application pool for each site. Pretty much all my sites are the same. Duplicates to be exact.
I am running a non-thread safe version. My logic in choosing this version that the thread version is presumably "unsafe". Hence, the name. Are you having a good experience with the Thread version??
What Im trying to figure out is why one site is really slow and another is really fast. They all are using the same php script and connecting to the same database. So I dont think my database or php code is the issue. It has to be the IIS Server and
my system which is really poor to be using in a production environment.
My guess is it comes down to the application pool for the particular site. One site is getting heavy traffic. At peak times on average of 1k visitors. I updated the fast-cgi module to automatically handle maximum instances but when I set that 20% of the
time a request can't connect to the mysql server. This is a big issue. I increased the number of maximum concurrent connections on my mysql server from 100 to 120 but still getting the same problem.
Does anybody know a way around this?
May 27, 2011 11:04 AM|HCamper|LINK
If your still having issues with FastCGI and PHP check this
Guide and look at changing / tweaking Execution Time and or Memory Limits.
You also might check the buffer size for MySQL Server and InnoDB
the IIS Net Forums has a recent post
with this issue.