6

I have a thin cluster set up to start 3 servers:

/etc/thin/myapp.yml

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

and the 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 by pid number or location for example?

deb
  • 12,326
  • 21
  • 67
  • 86

2 Answers2

12

There is something better for you try option: --onebyone

you may also add the following line to your config file

onebyone: true

afterwards you able to restart you thin cluster without any downtime.

sarvavijJana
  • 1,212
  • 10
  • 11
  • works great, thank you. Another thing is you might want to increase the `wait: 30` time if your server takes longer than that to start. – deb Oct 21 '11 at 14:50
7

I know the question has been answered, but I'd like to add the -o option to the mix.

So

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

Will only start the server running on port 3000. If let's say you have two other servers running on 3001 and 3002, they'll be left untouched.

-o works with start and stop commands too.

Coffee Bite
  • 4,956
  • 5
  • 33
  • 38