Question

I'm trying to setup multiple thin servers (running rails on windows), according to all the documentation that i've read the correct syntax is: thin start -s5 or thin start --server 5 . None of these work, i tried thin -h and got all the available commands, none of them (-s / --server) is not appearing in the list.

I am using thin 1.6.2 codename Doc Brown

Edit

thin -help output:

Server options:
    -a, --address HOST               bind to HOST address (default: 0.0.0.0)
    -p, --port PORT                  use PORT (default: 3000)
    -S, --socket FILE                bind to unix domain socket
    -y, --swiftiply [KEY]            Run using swiftiply
    -A, --adapter NAME               Rack adapter to use (default: autodetect)
                                     (rack, rails, ramaze, merb, file)
    -R, --rackup FILE                Load a Rack config file instead of Rack ada
pter
    -c, --chdir DIR                  Change to dir before starting
        --stats PATH                 Mount the Stats adapter under PATH

SSL options:
        --ssl                        Enables SSL
        --ssl-key-file PATH          Path to private key
        --ssl-cert-file PATH         Path to certificate

Adapter options:
    -e, --environment ENV            Framework environment (default: development
)
        --prefix PATH                Mount the app under PATH (start with /)

Tuning options:
    -b, --backend CLASS              Backend to use, full classname
    -t, --timeout SEC                Request or command timeout in sec (default:
 30)
    -f, --force                      Force the execution of the command
        --max-persistent-conns NUM   Maximum number of persistent connections
                                     (default: 100)
        --threaded                   Call the Rack application in threads [exper
imental]
        --threadpool-size NUM        Sets the size of the EventMachine threadpoo
l.
                                     (default: 20)

Common options:
    -r, --require FILE               require the library
    -q, --quiet                      Silence all logging
    -D, --debug                      Enable debug logging
    -V, --trace                      Set tracing on (log raw request/response)
    -h, --help                       Show this message
    -v, --version                    Show version
Was it helpful?

Solution

Help output is missing the Cluster options where the number of servers can be added as option:

Cluster options:
    -s, --servers NUM                Number of servers to start
    -o, --only NUM                   Send command to only one server of the cluster
    -C, --config FILE                Load options from config file
        --all [DIR]                  Send command to each config files in DIR
    -O, --onebyone                   Restart the cluster one by one (only works with restart command)
    -w, --wait NUM                   Maximum wait time for server to be started in seconds (use with -O)

considering this there are 2 options that gives you this issue:

  1. Windows does not support it
  2. Outdated gem version

update

https://github.com/macournoyer/thin/blob/master/lib/thin/runner.rb#L89

 unless Thin.win? # Daemonizing not supported on Windows

update 2 another option that might help on windows:

Starting multiple instances of Thin Server on Windows with a batch script

read help start and try this

start /b thin start
and read again help start and play with other options
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top