Dear WenJun Zhang,
Thank you for answer. It was indeed the application pool´s idle shutdown feature that caused the shut down of the idle processes.
I have now created a new application pool for my RoR site, trying to find settings that give acceptable performance for my application. Avoiding idle timeout of the Ruby processes in my pool helped to some degree but I have so far not been able to prevent the processes from dying after about 120 requests, regardless of the load I put on the IIS. So this is still a major problem.
The typical behaviour when testing the site with low load is a response time, when a ruby process in the pool starts, of 10 seconds. The following consecutive requests render a response in 90-120 ms, until the process dies and starts over. One Ruby process occupies about 35 Mb of memory, and there is plenty of memory on my server to accommodate many Ruby processes at the same time. During my resent tests I have limited the number of instances to 4. (MaxInstances=4)
In my application pool I now run with these settings:
Recycling panel:
Recycle worker processes (in minutes): unchecked,
Recycle worker processes (number of requests): unchecked,
Recycle worker processes at the following times: unchecked,
Memory recycling: Maximum virtual memory: unchecked,
Maximum used memory: unchecked
Performance panel:
Idle timeout: unchecked,
Request queue limit: unchecked,
Enable CPU monitoring: unchecked, maximum number of worker processes: 4
Health panel:
Enable pinging: checked,
Enable rapid-fail protection, unchecked,
Startup time limit: 100,
Shutdown time limit: 90
Fcgiext.init:
ExePath=D:\ruby\bin\ruby.exe
Arguments=D:\rails\Ruby\public\dispatch.fcgi
IgnoreDirectories=0
IgnoreExistingFiles=1
QueueLength=1000
MaxInstances=4
InstanceMaxRequests=100000
IdleTimeout=43200
StderrMode=IgnoreAndReturn200
ResponseBufferLimit=8388608
EnvironmentVars=RAILS_ENV:production
Are there any other settings I could try to manipulate in order to make my ruby processes survive more than 120 requests, even at low load conditions (two requests per second)
I really would appreciate suggestions how to resolve this problem.
Thanks.