How to reboot individual servers in a thin cluster in rails 3.1 app

I have a thin cluster configured to run 3 servers:

/etc/thin/myapp.yml

... wait: 30 servers: 3 daemonize: true ... 

and I use thin restart -C /etc/thin/myapp.yml to restart. However, I would like to restart each server at a time to reduce downtime.

Is there a way to restart each server using a pid number or location, for example?

+6
source share
2 answers

Something better for you try option: --onebyone

you can also add the following line to your configuration file

 onebyone: true 

then you can restart the thin cluster without downtime.

+12
source

I know that the question was answered, but I would like to add the -o option to the mix.

So,

 thin restart -C /etc/thin/myapp.yml -o 3000 

Only the server running on port 3000 will start. If you say that you have two more servers running on 3001 and 3002, they will remain untouched.

-o also works with start and stop commands.

+7
source

Source: https://habr.com/ru/post/899730/


All Articles