Hello Stephan I use build in server on port 80 ./bin/app.pl --port=80 and I send debug on my console ( via ssh ) it is quick to start and easy to develop with it The only one limitation I found is on ajax query ( it doesn't work correctly) and if I lost my console - server continue to work, but no really... you need to kill it in fact this is only for testing not for production - use ngnix or apache bye Hugues Le 26/09/2014 16:20, Stefan Hornburg (Racke) a écrit :
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 ... [13413] core @0.000008> Dancer::Session::Storable using session_dir : sessions in /data/perl5/biodatabase/lib/perl5/Dancer/Session/Storable.pm l. 35 [13413] core @0.013884> loading Dancer::Handler::Standalone handler in /data/perl5/biodatabase/lib/perl5/Dancer/Handler.pm l. 45 [13413] 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.
Regards Racke