> Dinooz, this is not a rake task or a rake file.
> Don't move or rename the file, it's a command line script.
> Cluster support is not builtin the commandline "thin" script.
> Start a cluster of 3 servers like this:
> $ thin start --servers 3
> Stop them like this:
> $ thin stop --servers 3
> Check the other options like this:
> $ thin -h
> Command line script is a lot more flexible then a set of rake tasks,
> but you could still wrap it on your rake tasks if you'd like.
> On Jan 13, 11:03 pm, Dinooz <bernardino.lo...@gmail.com> wrote:
> > First attemt to use Thin 0.5.2.....
> > Previously using Thin 0.5.0 the rake tasks look like this:
> > [dinooz@fedora gm]$ rake -T |grep thin
> > rake thin:cluster:start # Start thin cluster
> > rake thin:cluster:stop # Stop all thin clusters
> > [dinooz@fedora gm]$
> > Using a little shell script can start the Cluster very easy....
> > [dinooz@fedora gm]$ cat my_thin.sh
> > rake thin:cluster:start RAILS_ENV=development SIZE=1 PORT=6011
> > [dinooz@fedora gm]$
> > rake db:cluster:start Works Ok
> > rake db:cluster:stop Works Ok
> > After update to Thin 0.5.2
> > cp /usr/local/lib/ruby/gems/1.8/gems/thin-0.5.2/bin/thin /home
> > /dinooz/rails/nca/lib/tasks/thin.rake
> > Now the rake task looks like this:
> > [dinooz@fedora nca]$ rake -T |grep thin
> > Usage: thin [options] start|stop|restart
> > (default: log/thin.log)
> > (default: tmp/pids/thin.pid)
> > I'm not sure if is required to copy into the lib/tasks/thin.rake or
> > just leave it in the default path of the original install....
> > Detected problem with the Path when starting Thin with the command:
> > rake thin:cluster:start ENV=development PORT=6003 NUM=1
> > This might be due to the fact that I copy the files locally instead of
> > leave it in a standart installation path.
> > Edit Line 4 of the thin.rake file:
> > #require File.dirname(__FILE__) + '/../lib/thin'
> > require File.dirname(__FILE__) + '/thin'
> > Now Thin start properly but does not stop !!!
> > [dinooz@fedora nca]$ rake thin:stop
> > (in /home/dinooz/rails/nca)
> > Invalid command : thin:stop
> > [dinooz@fedora nca]$ rake thin:cluster:stop
> > (in /home/dinooz/rails/nca)
> > Invalid command : thin:cluster:stop
> > [dinooz@fedora nca]$
> > Of course I know I can find out the processes and kill it if I like
> > to... but that is not the point at this time I'm really interested
> > into benchmark the memory usage and the performance...
> > [dinooz@fedora nca]$ pstree -p |grep thin
> > |-thin(24519)
> > |-thin(26183)
> > |-thin(26254)
> > |-thin(28289)
> > [dinooz@fedora nca]$ free -m
> > total used free shared buffers
> > cached
> > Mem: 256 209 46 0
> > 0 0
> > -/+ buffers/cache: 209 46
> > Swap: 0 0 0
> > [dinooz@fedora nca]$
> > Just want to give the heads up, in case somebody like to try it...
> > will keep posting .... =)
> > Best Regards Dinooz.
> > PS -> I think another task for the rake task called status will be
> > great, to check the existence of the current instances... Also noticed
> > a restriction to create at least 2 instances in the Cluster, I like
> > the fact to be able to activate only 1.