About 30 RoR apps are waiting (frozen) for 1 app to run .. how can this be fixed?

I have a server with 30 Ruby on Rails applications.

When I (re) launch 1 of 30 apps then all other apps are unavailable and they seem to be waiting for the 1st app to start.

Even command: passenger status seems to wait until 1st app (re) starts.

Is this normal behavior? Or how can this be fixed?

(virtual) Server characteristics:

  • CPU: 3 cores x 2.2ghz
  • Memory: 4 GB
  • Hardisk: 40 GB

Server software:

  • CentOS 6.3 (Final) Release
  • Nginx version: nginx / 1.0.12
  • Ruby 1.9.3p125 (2012-02-16 version 34643) [x86_64-linux]
  • Phusion Passenger version 3.0.18

Nginx / Passenger config:

passenger_max_pool_size 50;
passenger_min_instances 1;
passenger_max_instances_per_app 2;

      

I'm happy to help with more details if needed.

Update ** Installed passenger venture and nginx, now the apps no longer bother each other on startup. So I think the problem was fixed with user_rolling_restarts on;

+3


source to share


2 answers


Hmm ... looks like it might be a "feature" of the open source version of Passenger. From http://phusionpassenger.com/enterprise :

In the open source version, restarting the Phusion Passenger application will close all application processes and create new ones. Because it can take a long time to start a new process (depending on the application), visitors may experience slow responses during the restart. By triggering the reload, Phusion Passenger Enterprise reloads your application processes in the background.

Thus, the parameters look like this:



1) switch to corporate version of Passenger

2) switch to another server.

Ugh.

+2


source


There are actually two questions at work here:



  • If you are not using a restart restart, your visitors will have to wait until the restart is complete. Just like drosborough says.
  • In addition, Phusion Passenger 3 locks the entire application pool when the first process for the application is born. During this time, no requests can be processed. Subsequent processes spawn in the background, and repeated restarts also run in the background so they don't affect requests. This blocking limitation is completely removed in Phusion Passenger 4 (and of course Phusion Passenger Enterprise 4): everything was done asynchronously.
0


source







All Articles