2

I wasn't sure which was best to post in so I posted here and on http://webmasters.stackexchange.com

I will delete the other if this post is more relevant here.

I'm having a slight issue with memory issues on my web server. It is Windows 2008 RC2 IIS 7.5 with Fast CGI installed and running, all up to date.

I have a number of Wordpress websites running on this server, yet they do not all run at the same time; server load/traffic is not that high at the moment.

However when some of them run, even if it just me on the site, they spawn multiple php-cgi.exe instances to handle my "surfing".

Some points to note:

  • I have Hyper Cache installed on each Wordpress site, and seems to be working fine.
  • I understand that the PHP-CGI.exe instances only stay alive for as long as required.

For example: one Wordpress website with pretty much no content and minimal plugins (Hyper Cache and Google Analytics) spawn:

  • The w3wp.exe instance and levels out around 10MB
  • 5 x php-cgi.exe which are each roughly 9MB

That amounts to 55-60MB at first run. It seems a bit extreme to me. Another site is pretty much the same at first boot but spawns 8 x php-cgi.exe instances. To put it another way, I would expect this usage from ASP.NET not PHP.

Can I limit the php-cgi.exe to one instance per website and have it handle all requests for that website?

Another point I should mention, I am running PHP 5.2.17. If I upgrade to PHP 5.3.* will this problem go away? (Not that won't break some sites but I can live with that)

Would my only solution to be move them to a Linux box or will I have the same issues doing so?

Thanks for your time and help.

Anthony
  • 367
  • 1
  • 4
  • 14
  • You are concerned about 50mb? Seriously? – TomTom Mar 02 '12 at 09:17
  • 50MB is not a lot for one site, but when you 30+ sites it soon adds up. It is a valid question. My server is hosted with a provider in Ireland, and comparing to US/UK pricing, Ireland sucks hugely... Resource costing on RAM is at least three times that elsewhere and don't get me started with HDD space. So what I am saying is RAM is limited and I want to make sure I haven't got a config issue on my server etc.. To have the attitude that it is not to worry about 50MB is not being responsible, a developer and webmaster has to account for every resource used no matter how small. – Anthony Mar 02 '12 at 09:30
  • Well, maybe or not ;) As in - I have not had my own servers for more than 10 years and memroy is freacking cheap (just built another one - 32gb for less than 500 USD). I regualrly trade size for speed (using gigabytes of in memory caching). – TomTom Mar 02 '12 at 09:32
  • To me or you building a server, memory is indeed cheap yet when the only alternative is to use a hosting provider in Ireland where costing is not - what choice do I have? Regardless, this is off topic from my question. I have a valid query that I would like to resolve if possible - if the only solution is to upgrade memory on the server so be it but I would like at least to be able to hash out the issue and see if there is an alternative - to see if the problem lies my side. I don't have cash to burn and an extra 1GB ram will cost me another €150 per year. Total then, 3GB. See my predicament? – Anthony Mar 02 '12 at 09:39
  • THis is why I commented only and did not see it as anser. Why you use a ireland provider, though? I live in poland and my servers are in germany and soon I have some in the US. I get a phenom 12 with 16gb and 100mbit unmetered traffic in the US for 150 USD per month. – TomTom Mar 02 '12 at 10:30
  • Unfortunately specifics require me to host in Ireland, up until December I was hosting in the UK and had access to more resources against cost. I will eventually migrate to my own dedicated box with www.simplyservers.com in the UK - I find their model and pricing to be quite decent, unless you know of alternatives in the UK? I would, if I was permitted, use US servers but sadly I cannot. – Anthony Mar 02 '12 at 10:41
  • Well, in my case I get a machien in the US to be closer to my partners (i.e. I exchange data with only a handfull amchines and want / need sub 10 ms delay there, so I colocate in the same city. I bear your problems, though. – TomTom Mar 02 '12 at 10:44

1 Answers1

0

Set the maxInstances of the system.webServer/fastCgi/application section of your configuration to the desired number of fastCGI processes you'll want to allow per application pool (not per website).

Mathias R. Jessen
  • 24,907
  • 4
  • 62
  • 95
  • I just found this myself and was coming to report. I set it back to the default of 4, where it was set to 0 - I assume unlimited. Is there any repercussions to this? Will it stop people from loading the website if all four are in use or will it simply mean the request will be queued - albeit not for a long time? – Anthony Mar 02 '12 at 10:38
  • Their request will just be queued for processing – Mathias R. Jessen Mar 02 '12 at 10:41
  • Great, I thought that. If I was to set it to "1". considering nearly all content is cached, would it have a huge effect on visits? If I was to guess, the average look up of the busiest site on the server would be maybe 10 visits per minute. – Anthony Mar 02 '12 at 10:43
  • If you only have 10 visits per minute, then no, I don't think it would have a big impact – Mathias R. Jessen Mar 02 '12 at 10:45