[dancer-users] Mysterious restarts of development server
Stefan Hornburg (Racke)
racke at linuxia.de
Fri Sep 26 15:20:46 BST 2014
On 09/26/2014 04:06 PM, Lutz Gehlen wrote:
> Hello everybody,
> I have a problem with the builtin web server of Dancer1. I use it for
> development and testing purposes. Sometimes - I haven't figured out what
> triggers this behaviour, but it happens sometimes rather quickly, sometimes
> after running for hours or even days - the server mysteriously switches to
> the development environment and port 3000.
> I usually start the server like this (omitting some nohup and bash
> redirection stuff):
> perl bin/app.pl --port 7000 --environment production
> In the output I see this:
>>> Dancer 1.3123 server 13413 listening on http://0.0.0.0:7000
>>> Dancer::Plugin::Database::Core (0.06)
>>> Dancer::Plugin::Lexicon (0.05)
>>> Dancer::Plugin::Database::Core::Handle (0.02)
>>> Dancer::Plugin::Database (2.09)
>>> Dancer::Plugin::Auth::Basic (0.030)
>>> Dancer::Plugin::EscapeHTML (0.22)
>>> Dancer::Plugin::Ajax (1.00)
> == Entering the production dance floor ...
>  core @0.000008> Dancer::Session::Storable using session_dir :
> sessions in /data/perl5/biodatabase/lib/perl5/Dancer/Session/Storable.pm l.
>  core @0.013884> loading Dancer::Handler::Standalone handler in
> /data/perl5/biodatabase/lib/perl5/Dancer/Handler.pm l. 45
>  core @0.014051> loading handler 'Dancer::Handler::Standalone' in
> /data/perl5/biodatabase/lib/perl5/Dancer.pm l. 483
> So far, so good, but then - after variable amounts of time as sketched
> above, this:
>>> Dancer 1.3123 server 13413 listening on http://0.0.0.0:3000
> The problem is that obviously, from now on the server is not reachable
> under port 7000 any more, and eventually, my testers complain and I have to
> restart the server.
> As you can see, the process ID does not change. Does the server exec itself
> forgetting the command line parameters? Or what else happens? I hope
> someone can help me avoid this behaviour.
My recommendation is not to use the builtin web server at all.
You could use same deployment for live and development, just with
a different Dancer environment.
Which is usually quite simple with plackup and an init script.
Perl and Dancer Development
Visit our Perl::Dancer conference 2014:
More information about the dancer-users