Drupal Performance on IIS7

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Canadaka's picture

Yes I run Drupal on windows, period. I don't want this to be a windows vs linux flame far. I much prefer the windows server enviroment and think IIS is far superior to apache.

So with that said I am looking for a discussion to get the best drupal performance out of IIS7/windows server.

I just recently re-made my wifes web comic website using drupal http://www.wastedtalent.ca/ and i'm running into some performance problems. I run about 50 PHP based sites on my servers and since I launched the drupal powered site my servers CPU usage has increased dramaticaly. I know you pay a price for drupals extentability, but it seems like its using far to much resources. So I want to make sure I am running it efficiently.

here is my current setup, I have 2 servers both running Windows Web Server 2008. One is a quad core the other a dual, both with 4GB of ram and scsi drives. One server runs IIS7, the other is dedicated to MySQL.

The server is running PHP 5.2.13 and MySQL 5.0.67
PHP is running in IIS through FastCGI. This is something i need to learn more about, confiruing FastCGI for best performance. I am running my drupal site off a seperate FastCGI Application from the rest of the sites I host. I did this so I can use a different php.ini with some drupal specific tweaks. Each site including the drupal site has its own Application Pool in IIS.

These are the FastCGI settings I'm currently using:

MaxInstances="4"
activityTimeout="120"
requestTimeout="120"
instanceMaxRequests="10000"
rapidFailsPerMinute="20"
PHP_FCGI_MAX_REQUESTS="10000"

I'm not sure if increasing the MaxInstances will have a positive effect?

For URL Rewriting I am using ISAPI Rewrite 3, which is an "ISAPI Filter" loaded on the drupal site in IIS.

Here are some PHP specific settings I am using:

max_execution_time = 120
memory_limit = 1024M

and here are the extensions loaded:

extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mcrypt.dll
extension=php_soap.dll
extension=php_openssl.dll
extension=php_mysqli.dll
extension=php_memcache.dll
extension=php_wincache.dll

I have the Microsoft Wincache 1.1 beta installed and given it "wincache.ocachesize=256".
http://www.iis.net/expand/WinCacheForPhp
I also have memcached installed as an alternative to WinCache for the Cache Router.
You can see my Wincache stats here: http://www.wastedtalent.ca/wincache.php

here are some MySQL specific settings

drupal tables are MyISAM
max_connections=800
query_cache_size=512M
table_cache=1520
tmp_table_size=512M
thread_cache_size=38
myisam_max_sort_file_size=100G
myisam_sort_buffer_size=256M
key_buffer_size=614M
read_rnd_buffer_size=2M
sort_buffer_size=4M

both servers have 4GB of ram and usualy sit around 2GB of memory used. The IIS server cpu used to stay mostly below 50% but now with the drupal site its averaging higher than that and spikes a lot. sometimes it will stay at over 90% for a long time. The FastCGI processes that are running drupal are always the highest cpu usage.
http://i355.photobucket.com/albums/r469/canadaka_bucket/cpu_usage.png
The CPU usage on the database server is always low < 20%

Now here are my drupal details. I am using "Boost" to serve fully cached pages to anonymous users, this seems to work well and cached pages load very fast. I am also using "Cache Router", I have been experimenting using the Wincache as the router and memcache. Currently I am using memcache since I've ran into some problems with the wincache router. I only have a memcache server running on my IIS server, I'm not sure if there is a benefit to running it also on my database server and adding that IP to the array?

I am also using "Block Cache Alter" to cache many of the blocks, and I cache most of the Views2 queries.
For authenticated users I am using "Authcache" which works with "Cache Router".

I cannot get GZIP through boost working, that is another issue. But i have enabled IIS7's gzip compression and it seems to be working.

I've added mysql indexes as mentioned here http://groups.drupal.org/node/57213

I enabled the devel module's performance logging for half a day to see the memory usage and avg page loads.
http://i355.photobucket.com/albums/r469/canadaka_bucket/performance_log.png

I scanned the site with Google and Yslow and here are the scores:
Google page speed score 81/100
YSlow Grade D score: 67

I've enabled MySQL's slow query log for 4 seconds, and drupal isn't producing any queries. I guess i will have to lower the time threshold.

I have cron.php running every 10 minutes through Windows schedualed tasks using the command line PHP.

Finaly here are the drupal modules that are installed. I actualy had a few more like statistics & tracker2, but i've uninstalled them to try and speed things up.

Administration menu
AdSense core
Managed ads
Advanced Forum
Authcache
Author Pane
Avatar Crop
Block Cache Alter
Boost
CacheRouter
CAPTCHA
Image CAPTCHA
Content
Node Reference
Number
Option Widgets
Text
CKEditor
Community Tags
Custom Pagers
Date
Date API
Date Popup
Date Timezone
Extra Voting forms
Fbconnect
Feedburner
FileField
Flag
Flag abuse
Google Analytics
Gravatar integration
ImageAPI
ImageAPI GD2
ImageCache
ImageCache UI
ImageField
jQuery UI
Lightbox2
Link
LoginToboggan
Menu Trails
Mime Mail
Nodeaccess
Nodewords
Nodewords - basic meta tags
Nodewords - site verification meta tags
Page Title
Pathauto
Path Cache
Persistent Login
Secure Password Hash
Prev/Next
Privatemsg Email Notification
Private messages
Quick Tabs
Quote
Scheduler
Signatures for Forums
Simplenews
Simplenews on register
Site map
Subscriptions
Content Subscriptions
Subscriptions Mail
Taxonomy Subscriptions
Subscriptions UI
Tagadelic
Taxonomy Image
Term Node Count
Token
Twitter Pull
Conditional Actions
Add Donation
Canada Post Shipping
Store Credit: User Points
Store Credit
Payment
PayPal
Shipping Quotes
Shipping
U.S. Postal Service
Attribute
Cart
Catalog
Google Analytics for Ubercart
Order
Product
Reports
Roles
Stock
Store
Username AJAX check
Userpoints
Userpoints Nodes and Comments
User Points Top Contributors
Userpoints User Picture
User Points Voting API
User badges
Views
Views UI
Voting API
XML sitemap
XML sitemap node
XML sitemap taxonomy

So I am looking for ways to increase the load time and possible lessen the server load for this drupal site. Its definatly not super fast loading for authenticated users, but its acceptable. But its definatly WAY slowe than the old hand-coded site. I'm just worried about when traffic spikes how the servers will handle it. The site is occassionaly linked somewhere like reddit and gets a flood of traffic.

I am looking for any advice on how to fine tune IIS, FastCGI, PHP, MySQl or drupal.

Comments

There are a lot of pieces to

chicagomom's picture

There are a lot of pieces to go through when working through the stack to optimize a complex setup like this, but this may be a good place to start asking questions. Another good place might be php.iis.net's forum, esp the FastCGI forum.

Having said that, one thing I read about recently was the update to FastCGI for IIS7.0 (not sure if you're running 7.0 or 7.5) that enables FastCGI to optimize MaxInstances itself if you set MaxInstances=0. From the forums:

Real-time tuning of MaxInstances setting. This MaxInstances setting dictates the maximum number of FastCGI processes which can be launched for each application pool. Set it to 0 to let FastCGI module automatically adjust the number of instances up or down based on the system load and number of requests waiting in the queue.

If you haven't already tried this, you might try it to see if FastCGI handles this better by itself than if you set MaxInstances manually.

chicagomom on Twitter and d.o.

thanks for the reply. I

Canadaka's picture

thanks for the reply. I actualy did come across that FastCGI update a few days ago and installed it already. I didn't read the changes thoroughly and didn't realize the new MaxInstances thing, I will definatly try that out.

I am running IIS7.0 on Windows Web Server 2008 SP2, can one upgrade to IIS7.5? Or is that only if you upgrade to Server R2, which I assume is not free. I am confused on the upgrade path to R2 and its hard to find info.

Let us know how that works

chicagomom's picture

Let us know how that works for you.

Also, fyi Zend recommends MaxInstances at 10 for high load Web servers. So if 0 doesn't work, you might bump it up and see if you see an increase.

chicagomom on Twitter and d.o.

yup it works, I changed to 0

Canadaka's picture

yup it works, I changed to 0 and instantly I saw a 5th instance popup. Thanks again for the suggestion!

application pools

greggles's picture

I think this is a great thread. Hopefully we can pick up some good tips.

I help admin two relatively large sites running on IIS. One thing that the server admin did was to create application pools so that he could better monitor each site and see which one was really causing problems. This also helps to isolate the performance drain of your Drupal site so that it doesn't take down the rest of your sites.

Yes I already do this, each

Canadaka's picture

Yes I already do this, each site I have in IIS has its own application pool. I think this is one of the many benefits of IIS over apache. My IIS NEVER crashes, one site might crap out and take down its application pool, but not the rest.

I also like that when you use seperate application pools you can see them in the windows task manager.

Hi there!

chicagomom's picture

Hi - good to hear from you! Just a note that if you haven't already, please drop in at groups.drupal.org/drupal-iis, the Drupal on IIS group for a chat sometime.

chicagomom on Twitter and d.o.

I forgot about the

Canadaka's picture

I forgot about the application pool settings, here is what I currently have. I think most of it is defaults.

Only local images are allowed.

tauno's picture

Are you seeing any performance increase with wincache or memcache?

This isn't an IIS specific suggestion, but using xdebug and something like wincachegrind (http://sourceforge.net/projects/wincachegrind/) can help to track down if there is a specific module (or 2 or 3) that is really slowing things down.

The performance log

smk-ka's picture

The performance log (http://i355.photobucket.com/albums/r469/canadaka_bucket/performance_log.png) shows that single node views seem to suffer from serious performance issues, with average response times ranging between 2 and 3 seconds. Since this is obviously not database related (the average query time is the same for some of the admin pages, which are much faster), is looks like there must be some blocking function when displaying nodes. Like tauno said, use XDebug with WinCacheGrind or WebGrind to find the culprit.

-Stefan

Check views queries

kbahey's picture

On Drupal 6, views queries do not get counted among the database query time.

There is a settings in views to view the time for views.

So enable that first to make sure that this is not the case before you give the database a clean bill of health.

Then, if you still have high PHP times vs. database time, then look into other things.

For example, a common thing is when you contact another site on every page load. See this article for details: how relying connections to third party servers can be detrimental to performance.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

I actualy did this last

Canadaka's picture

I actualy did this last night, I setup a local IIS7.5 & mySQL server on my desktop and made a copy of the site to run locally. I use NuSphere PhpED which has built in debugging and profiling. I run the profiler, but honestly I don't know what to make of it. I assume the output from this is very simular to XDebug * WinCacheGrind

Only local images are allowed.

As far as the views queries, if there were any really slow ones they would still show up in the mySQL slow query log. I am caching almost every view, all the ones on the homepage and other node comic pages are cached. Which is the name of the setting you are talking about? I assume its one of the settings in admin/build/views/tools

As far as things that connect to third party servers, I do have a few, but they are fairly common. Google adsense, adthis widget, Facebook Connect and ohnorobot.com

I ran a test using pingdom.com and it does seem like the script from ohnorobot is slow.
Only local images are allowed.
But I ran the test a few more times and it was faster loading then.

Server side not client side

kbahey's picture

When I meant connections to third party server, I mean from Drupal, not from your browser.

The ones from the browser will not affect the total execution time reported from devel. The server side connections will.

The 755 ms time does not seem as high as the 2500+ ms that was reported via the performance module though.

So something does not add up here.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.

Ah i see. The only

Canadaka's picture

Ah i see. The only server-side offsite connection that I know of is with the Twitter API, and that is cached with the "twitter_pull" module.

It might not be as high because im doing the profiling on my local server not the production server. My local server is under no load, the production is.

Here I installed xdebug on my

Canadaka's picture

Here I installed xdebug on my local dev with the nifty firefox addon to start the profiler on demand. Here is one of the outputs
http://www.box.net/shared/4v121quc6c

The site does load a bit faster on my local dev server, since its a quad core with 4GB ram sitting mostly idle.

I'm never used

Canadaka's picture

I'm never used Xdebug+wincachegrind much so i'm not entirely sure how to use it to find slow code.
I think im getting somewhere though, searching around through wincachegrind i noticed that the node_view() render is slow, which is to be expected I supposed. but the slowest part of that was part of a contrib module called "custom_pagers". When i dove more into that it seems the view that it uses to construct the pagers was slow. So rather than use a view i overrode it with simplier PHP code.

$nodes = array();
$result = db_query("SELECT SQL_CACHE nid FROM node WHERE node.type='comic' AND status <> 0 ORDER BY created ASC");
while ($row = db_fetch_array($result)) {
$nodes[] = $row['nid'];
}
return $nodes;

So the custom_pager_build_nav() fucntion went from around 500ms to 19ms to render. So now the comment_render() takes longer to load than the node_view()
comment_render = 916ms
node_view() = 352ms

The slowest part of the comment_render() is the zen_preprocess_comment() so i will see if I can just remove that. The Zen theme seems to do a number of preprocessing that i'm not sure I even need.

Also seems strange that many of the ubercart functions are called in the node_view() even though this node isn't a ubercart product. But they are all low render time. 0.3ms * 7.

Using the profile is proofing

Canadaka's picture

Using the profile is proofing very useful. Found out that my blocks arn't being cached by "Block Cache Alter" via the profiler. I had to install the latest DEV version of that module and apply a patch to get the caching to work with "node access" module.

The slowest thing on a node page is definatly comment_render() not sure how I can really speed that up. Each comment takes around 46ms to load. I did notice if I disable the "gravatar" module it lowers that to 25-30ms per comment. But I really kinda want the functionality of the gravatar module. I think its probabliy slow because looking at its code it calls user_load() for each comment.

Little by little things are improving though.

I am also back to using "wincache" as the engine for "Cache Router", after giving the user cache more memory and adding some @ to the code to surpress erros it seems to be running with no problems thus far. I think using wincache is faster than memcached.

good progress

greggles's picture

This seems very interesting. Gravatar module may also occasionally be making calls to the external server.

I suggest creating an issue for Gravatar module and showing your research. Perhaps it can do something simpler rather than a full user_load.

I will do that. Because the

Canadaka's picture

I will do that. Because the comment_render() is so slow i've take the comments off the homepage, but I would like them there.

I also have tested every query made by the views i have created to see if any were slow, they were all under 100ms. So I don't think anything related to the database is a bottleneck, its PHP execution that is the slow part.

I am maybe thinking about not showing comments on the comic node pages, and instead having a link to view the comments on a seperate page. Because I think the majority of people viewing the comic probably don't read or post to the comments. Or even better would to have the comments load after the initial pageload via an ajax call.

I'm also interested in server settings I can tweak to get more out of the IIS or PHP. I think i've already done most of the obviosu things I mentioned in my first post.

see the talk module

greggles's picture

It sounds below like you've already built this, but take a look at http://drupal.org/project/talk which provides just such a feature.

Yah I saw that one already,

Canadaka's picture

Yah I saw that one already, it could be useful in some situations. But I think for me I rather have an ajax type thing, its faster for the end-user than re-loading a whole new page.

I am maybe thinking about not

dalin's picture

I am maybe thinking about not showing comments on the comic node pages, and instead having a link to view the comments on a seperate page. Because I think the majority of people viewing the comic probably don't read or post to the comments. Or even better would to have the comments load after the initial pageload via an ajax call.

You need to decide whether you are trying to get the fastest possible page loads, or decreased server load. Loading stuff in via AJAX may reduce the time it takes to generate the HTML document, but having multiple HTML/AJAX requests per page means multiple Drupal boostraps which means higher server load.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

Hmm I wasn't thinking about

Canadaka's picture

Hmm I wasn't thinking about the fact that the bootstrap would have to be run again, good point. After setting up lots of this caching and tweaking settings and code, my server load is much better, so my concern is now more focused on pageload speeds.

AJAX load anything with one request

mikeytown2's picture

Working Example:
http://drupal.org/node/657826#comment-2372308

Initial Discussion:
http://groups.drupal.org/node/24825

So for comments you save a list of all nodes listed on the page (see boost stats block code for starting place). Pass this list of nid's to the ajax request, and in the ajax response is a the html for those comments. Append to the end of the node div (#node-8' for node 8) the comment html. Taking this a step further, you then don't have to invalidate the cache for each comment, and if you want, cache the rendered comments in a table and rebuild that entry when a comment gets edited/created/deleted.

If comments are a big part of your site then doing something like the this could get you a lot out of your site... otherwise I would look for a more generalized approach to this in the authcache module.
http://drupal.org/project/commentblock
http://drupal.org/project/ajaxify_regions

thansk for this info, very

Canadaka's picture

thansk for this info, very useful. I am thinking I can by default not load any comments and just show a link to "view comments" that will use jquery click() to make an ajax call and load the comments below. This way the bootstrap is only loaded twice for people that care about the comments, which is probably a low percentage of web traffic.

I have tested this and have some basics working, I just need to stop comment_render() from loading in the node, any idea how to do that? I guess the "commentblock" module will do that, but i don't really want to install yet another module for such a small thing.

taking a quick peak at the commentblock module's code it seems they surpress the default node comments from displaying with the folling function. But does that actually stop the PHP code for constructiong the comments from executiong?

function commentblock_nodeapi(&$node, $op) {
if ($op == 'view') {
$node->comment = NULL;
}
}

Nevermind the $node->comment

Canadaka's picture

Nevermind the $node->comment = NULL; does work, just went through an xdebug output and the comment_render isn't there.

I pretty much have this working, made a custom page that just prints out the comment_render(). When loading a node/comic page I don't display the links at first, I instead have a link to "view comments", when i click that I call this page with ajax with the NID as an argument.

Now I just need to decide if I actualy want to impliment this and make it look pretty. I'm just concerned that not displaying the comments on the page at first might result in less people posting comments.

Comment Counter

mikeytown2's picture

Display a comment counter, lets people know there's something there.

I don't know whats happening,

Canadaka's picture

I don't know whats happening, 3 times in the last several times the site has ground to a halt. Trying to load any page the browser just sits there an eventualy times out. Guest users still load ine if they are visiting a page with a boost cached page.

The server cpu usage isn't abnormaly high when this happens, there doesn't seem to be any more errors in the watchdog than normal.

I have "failed request tracing" enabled in IIS for my drupal site for PHP 500 errors. When the site is operating normal no dumps are made, but when this freezing happens many FailedReqLogFiles logs start to be generated. There are 40 of them in a 5 minute period, they mostly are errors like this:

ModuleName FastCgiModule
Notification 128
HttpStatus 500
HttpReason Internal Server Error
HttpSubStatus 0
ErrorCode 2147942658
ConfigExceptionInfo
Notification EXECUTE_REQUEST_HANDLER
ErrorCode The wait operation timed out. (0x80070102)

This time I opened task manager and also notice that there were a lot of php-cgi.exe processings spawned, since i changed the FastCGI MaxInstances to 0, it seems like it got out of control. So I'm going to set it to a static value of 10 for now.

I don't know why this is happening, all 3 times its happening to my knoledge I have been around and noticed it fairly quickly. To fix it I have to completely stop the application pool for a few seconds and wait for all the fastCGI processings to stop, then start the pool back up. I'm not sure what would happen if i wasn't around, the site might sit there stalling away for hours....

I am also getting a whole bunch of errors like this in the drupal watchdog, not sure if its something to be concerned about or how they are generated.

Location
http://www.wastedtalent.ca/sites/all/themes/wt/logo.png00011387744704|http|www.wastedtalent.ca/sites/default/files/imagecache/comic_full/comics/2010/wt_decentralizeddance.jpg00006988368236|http|www.visuex.com/shimmer/images/banners/shimmer8831ad.jpg00008688232032|http|www.terra-comic.com/wordpress/wp-content/themes/comicpress-v3c/style.css00007887725260|http|www.wastedtalent.ca/sites/all/themes/wt/images/comment_arrow.png00007388490032|http|www.terra-comic.com/wordpress/comics/2010-04-02-Page-89.jpg00005088366164|http|www.terra-comic.com/images/vote2.jpg00004388398040|http|www.choicecomics.net/link/2110000528843688

Message
file_exists() [function.file-exists]: open_basedir restriction in effect. File(sites/all/themes/wt/page-sites-all-themes-wt-logo.png00011387744704|http|www.wastedtalent.ca-sites-default-files-imagecache-comic_full-comics-wt_decentralizeddance.jpg00006988368236|http|www.visuex.com-shimmer-images-banners-shimmer8831ad.jpg00008688232032|http|www.terra-comic.com-wordpress-wp-content-themes-comicpress-v3c-style.css00007887725260|http|www.wastedtalent.ca-sites-all-themes-wt.tpl.php) is not within the allowed path(s): (D:\Hosted Sites\;C:\Windows\Temp;C:\Program Files\PHP\upload) in D:\Hosted Sites\angelamelick.ca\wastedtalent.ca\includes\theme.inc on line 755.

Might look at that open_basedir restriction

chicagomom's picture

Wondering about the open_basedir restriction - you have it enabled in php.ini? If so, I'm wondering if your app is getting stuck here. PhP.net sez open_basedir is deprecated as of PhP 5.3, and most other places I've read don't seem to recommend its use. It looks like you're pulling images from a bunch of different urls - could this open_basedir be part of the issue?

Wondering if greggles or someone else might have any recommendations in this area for a better way to accomplish what open_basedir was originally set up to do.

chicagomom on Twitter and d.o.

Hmm why would they take it

Canadaka's picture

Hmm why would they take it out? I'm still running 5.2.x though. I have it on because in the past I've had hackers get in through php scripts and much things up. Having that open_basedir setting in the php.ini prevents them from getting anywhere else in the system besides the web files.

I also get errors like this when using a filter on a view

warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(sites/default/files/filecache/cache_block/6/6c7e8b3d5dd5b410ff0d834e24edc11a--views-related_comics-block_1-wt-http---www.wastedtalent.ca-archive-tid%5B%5D=9&date_filter%5Bmin%5D%5Bdate%5D=&date_filter%5Bmax%5D%5Bdate%5D=2010-04-12&field_characters_nid_1%5B%5D=1226&tid_1=&title=&field_comic_number_v) is not within the allowed path(s): (D:\Hosted Sites\;C:\Windows\Temp;C:\Program Files\PHP\upload) in D:\Hosted Sites\angelamelick.ca\wastedtalent.ca\sites\all\modules\contrib\cacherouter\engines\file.php on line 44.

So I guess I can try disabling the open_basedir just for this drupal site, thanks for the suggestion.

My error

chicagomom's picture

I'm sorry, I misled you. PhP is deprecating safe mode, not open_basedir. PhP.net's documentation does say that "As of PHP 5.3.0 open_basedir can be tightened at run-time. This means that if open_basedir is set to /www/ in php.ini a script can tighten the configuration to /www/tmp/ at run-time with ini_set() "

Still the issue does seem to be with open_basedir. A quick Google search turned up quite a few cases where other PhP apps took performance hits when open_basedir was enabled - so, this doesn't appear to be specific to Drupal or IIS.

It seems as though this might be inherently resource-intensive; don't know if you've experienced this with other PhP apps or not. A 2006 advisory from Hardened PhP notes that open_basedir is "vulnerable to race conditions". Their recommendation is ultimately this:

you should start thinking about not relying on PHP's open_basedir and safe_mode restrictions but on actual operating
system features like chroots and jails, because open_basedir and safe_mode are simply insecure by design.

It seems the way to do this with IIS7 is to make use of those separate Application Pool Identities. Hope that helps a bit.

chicagomom on Twitter and d.o.

thanks for the info, very

Canadaka's picture

thanks for the info, very interesting stuff. I didn't know there was a performance hit to using open_basedir. I do run every site with its own application pool, but they almost all use the same "NetworkService" for security. I guess what I should do is create a unique user for each application pool and give that user read permissions to only that sites www files.

Nice to find your post. I'm

ionut.alexuc's picture

Nice to find your post.

I'm using almost the same configuration as you, except the hardware.

I have a question about wincache1.1 beta.
I had wincache1.0 and I got a lots of "out of memory" errors. The guys from IIS support forum said it is a known bug and they will fix it in the next realese.
Do you have this kind of errors? You could check the php error log.

Now I'm using xCache, because it was the only one op-code non-thread-safe.

Regarding improving performance:
I'm using also pressflow + squid (reverse cache proxy).
You could check that configuration if you didn't check it so far.

It is very useful, because you will have squid in front of IIS, and it will deliver all the static content (images, js, etc) without to bother the IIS.

We have a site with a lots of images, movies and flash and squid is doing its job.

I hanv't been getting "out of

Canadaka's picture

I hanv't been getting "out of memory" erros with wincache, i have the memory values set to max though. I tried xcache in the past and never found it stable.

I didn't find out about pressflow until after I was done building the site, so i'm not sure if I can switch at this point. Unless the database is not different and I can just use my current drupal DB.

I will have to investigate Squid more, I don't really know too mucha bout it. Can you run it on the same server as IIS? I kinda thought it was meant to be on its own server in-front of the web server. I guess squid is only good for annonymous traffic though?

I'm using squid on the same

ionut.alexuc's picture

I'm using squid on the same machine as IIS.
squid is listening on port 80 and forwards the dynamic requests to IIS.

Squid is used for all users.
It caches and delivers only static content like, .jpg, .png, .flv, .swf.

Best Performance on IIS

vidichannel's picture

Great thread for me. Also running IIS on 2008R2 Enterprise. Another Note: The latest final Wincache 1.1 (installed a month ago) has worked quite well for me (now with user cache). Replaced APC. I just added it directly from the Web Platform Installer.

Installed the latest Panels 3.7 and was really impressed with the new benefits, but it gave a hit to the page load on the site forcing me to seek the best combo for cache. Looks like Boost is a good bet for static content with anonymous users anyhow. Thanks for the great suggestions.

This is a bad place for a support question..Maps on IIS

fwood's picture

Ok Guys, try not to give me a hard time when I post this here. It is because I really need people tuned into the IIS environment for this problem. I run all my sites on Linux/Apache, so this new ball game and new person to deal with has me sort of crippled on this server.

Here's the deal. We moved the site to this company server. It is IIS7, I believe. When I log in via FTP I am getting Windows NT environment. The server is managed internally and we can do only limited things. I have to ask for everything to be done, so I want to be sure to ask the right things. I should say as well that the site works as expected on every other hosting, but this one. We tried dragging it around a bit.

First they said no Ajax, so we axed Panels, then Google Maps displayed the "Javascript is Required to View this page". I tried a few of the fixes for this, but unlike some people I don't like chasing my tail over and over and this "feels" like a generic error for anything that goes wrong with this display. I did see one intriguing post about permissions and I am waiting for the company to look at the folder/files to see if things are okay with that.

My questions are these: Did you have to set your permissions (and in this case them)on the folder sites/all/default files? I mean aside from initial setup is this something that you have to be fully aware of when you install Drupal on IIS, and put files in there? Do you have to change js file permissions (this was one person's problem, they said Windows changed the permissions to 777 and they should be 644) ?
Finally, any tricky things when working Google Maps and IIS?

Thanks!

Hmm I wasn't aware IIS could

Canadaka's picture

Hmm I wasn't aware IIS could stop "ajax" or javascript from running on the clients end... sure its not your browsers setting? I guess if you remeved the .JS mime type in IIS it might do that. Or maybe you are using the drupal JS cache to combine all the js files, but don't have correct write permissions.

You do have to set permissions on IIS or windows. There is no CMOD, you use NTFS permissions. THe most simple, but not the most secure, is to give write permissions to the "sites/all/default" folder-files-subfolders to the "authenticated users" group. Right click the folder and goto the "security" tab.

I'm not aware of any problems with google maps related to IIS, should be no different than apache.

dir not writable fallback

mikeytown2's picture

I've encounter this happening; but my issue had to do with the files dir being mounted on S3 (something that is close to impossible to do on windows). My solution to this is this patch: http://drupal.org/node/755586

Thanks for that

fwood's picture

I will give a look at this patch and see if this is something that can help. I appreciate the help!

I wish it were that simple

fwood's picture

lol.. I wish I was a newbie and that was the problem. Unfortunately, the fact of the matter is I build and move sites everyday (for about 12 years) and this is the most frustrating thing I have run across. Not to mention the fact that I was talking about this site running beautifully on all the other servers.

It has been utter chaos since we moved to this server and I have worked on Windows servers in the past, just not with Drupal. First we had multiple FTP errors, then AJAX, now this. I have never seen such problems!

Have these guys hosted PHP on IIS before?

markjbrown's picture

Are the people who manage this IIS familiar with PHP on IIS? There are some things to know that a number of Windows/IIS admins may not be familiar with. Typically I tell these folks to use our Web PI to install PHP on IIS because it installs PHP and WinCache and configures them properly. However for a production environment you still need to know how to tune that this takes some knowledge just like on any web server.

We have a very good and comprehensive list of articles that go into a lot of detail on how to properly install, configure, optimize and manage IIS for hosting PHP. Definitely worth a read for anybody that does this. http://learn.iis.net/page.aspx/24/running-php-applications-on-iis/

With regards to the Google Maps thing that makes no sense at all. I worked on the Bing Maps team and stood up and have run both GMaps and BingMaps on IIS dozens of times. It's just jscript on a webpage. Got to be something else going on there.

-Mark Brown
Web Platform Team
Microsoft

I think so

fwood's picture

I don't know what the deal is really. They seem to know what they are doing. They actually have several sites using Drupal. They sent me to one and indeed it looked like it had Maps working, but their base path looks like they are in the natural root and not a subfolder like we are.

Found Something ODD or NOT? Not a Script problem.

fwood's picture

Thanks for trying to help me with this. After days of frustration I have discovered something.

I placed test html pages in module folders (call it a hunch) and every folder that contained the version number in the name ie gmap-6.x-1.1 would only return a 404. Modules without dashes etc just displayed the page.

When I checked the other site that was hosted on their server I noticed in the source that all modules called had no dashes.

My brain is so fried I can't even put a solution together!