[dancer-users] New session on reload using Apache CGI

Warren Young wyml at etr-usa.com
Mon Feb 15 10:16:27 GMT 2016

On Feb 15, 2016, at 2:37 AM, Andrew Beverley <andy at andybev.com> wrote:
> On Sun, 2016-02-14 at 22:45 -0700, Warren Young wrote:
>> On Feb 14, 2016, at 6:40 AM, Andrew Beverley <andy at andybev.com> wrote:
>>> It sounds like you are using Session::Simple (the default), in which 
>>> case the session will only be held in memory per-process. Try 
>>> another session engine, such as Session::YAML.
>> Alternately, run Apache as a reverse proxy to a constantly-running 
>> Dancer app,
> But you'd still have the same (or similar) problem, if you had more than
> one process serving the proxy requests? The sessions would be stored per
> -process, meaning that they would only be remembered if it was the same
> process that served the same user each request.

When you run Dancer under mod_proxy, there may be multiple Apache children, but there is still only one Dancer process.

The only way you get into trouble here is if you’re using a multi-threaded or multi-process PSGI server (e.g. Starman) so that there are multiple global session stores in memory.

My assumption in replying is that the OP was not only using Dancer[2]::Session::Simple but also running with the simple built-in web server.

More information about the dancer-users mailing list