[Dancer-users] many dancer apps with Starman (part 3)

Mr. Puneet Kishor punk.kish at gmail.com
Mon Jul 18 23:43:25 CEST 2011


On Jul 15, 2011, at 9:02 AM, Pedro Melo wrote:

> HI again,
> 
> On Fri, Jul 15, 2011 at 2:51 PM, Pedro Melo <melo at simplicidade.org> wrote:
>> Its possible to remove even the longer response times using
>> server-starter *I think* but I don't use it, don't know how well it
>> works.
> 
> I got curious, and its actually quite simple to use start_server.
> 
> To start your app:
> 
> start_server --port=8811 --pid-file=my_x_app.pid
> --status-file=my_x_app.status -- starman bin/app.pl
> 
> You need both --pid-file and --status-file.
> 
> To restart:
> 
> start_server --pid-file=my_x_app.pid --status-file=my_x_app.status --restart
> 
> The command will wait to see if the restart was successful, by
> monitoring the status file.

The above is great help. However, I am trying to use `start_server` with `plackup` options and getting the following error

$start_server --port=5000 --pid-file=pids/app.pid --status-file=status/app.status -- plackup -s Starman -w 10 -E production -D -a ~/Sites/blog/bin/app.pl
start_server (pid:4453) starting now...
starting new worker 4454
new worker 4454 seems to have failed to start, exit status:0
starting new worker 4461
new worker 4461 seems to have failed to start, exit status:0
starting new worker 4468
new worker 4468 seems to have failed to start, exit status:0
starting new worker 4475
^Cworker 4475 died unexpectedly with status:0, restarting
starting new worker 4482
received INT, sending TERM to all workers:4482
worker 4482 died, status:0
exitting

and, in spite of the above, it seemed to have started several starman master processes. That is not what I wanted.

$ps -ax | grep 'starman master'
 4455 ??         0:00.01 starman master           
 4462 ??         0:00.01 starman master           
 4469 ??         0:00.01 starman master           
 4476 ??         0:00.01 starman master           
 4483 ??         0:00.01 starman master           
 4496 ttys001    0:00.00 grep starman master

of course, the bare plackup command works fine

$plackup -s Starman -w 10 -E production -D -a ~/Sites/blog/bin/app.pl

The above starts only one master and 10 workers.

Suggestions?



More information about the Dancer-users mailing list