0

I am wondering if somebody could inform me of the correct behaviour for a Rails app running through Rack/Passenger, as I am seeing some unusual behaviour on a production system which has never been running quite right.

My understanding is that Passenger will create instances of Rack to satisfy demand for a web application. The problem I have is that both Passenger and Rack processes disappear after a few minutes runtime. In this eventuality, the next request will restart both Passenger and Rack, but this can take upwards of 10 seconds.

When I look at the process list, I see that when things are working well I have at least one instance of "Rack: /my_application". I also have "Passenger ApplicationSpawner" running.

ApplicationSpawner seems to disappear after about 10 minutes, and the Rack instances sometimes disappear as well. I sometimes end up with no Rack processes or an ApplicationSpawner, so the next request takes ages.

Any ideas as to how to correct this?

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940

1 Answers1

1

That's intended (and even, some say, desired) behaviour on Passenger's part. It likes to prune unused appserver workers so that the RAM is available for other things if necessary. You can adjust Passenger's behaviour with PassengerMinInstances and/or PassengerPoolIdleTime.

womble
  • 95,029
  • 29
  • 173
  • 228