[dancer-users] Dancer crashing

Hermann Calabria hermann at ivouch.com
Tue Mar 12 22:08:46 GMT 2019


I forgot to mention, this issue –whatever it is -- causes Dancer to die completely, as in the main Dancer event loop crashes, and the process has to be restarted. 

Sure, it’s probably something my app is doing.  However I expect Dancer to be resilient enough to not crash in this manner.  Plus the fact that it’s intermittent, your comments re state notwithstanding, make this one particularly difficult to debug without having an intimate understanding of the guts of Dancer.  

I’m hoping one of the Dancer devs takes a quick look, as in any case, even if my app is causing the problem, there’s likely an opportunity here for improving Dancer.  In the meantime I will continue investigating.


From: Warren Young
Sent: Tuesday, March 12, 2019 1:59 PM
To: Perl Dancer users mailing list
Subject: Re: [dancer-users] Dancer crashing

On Mar 12, 2019, at 12:10 AM, Hermann Calabria <hermann at ivouch.com> wrote:
> 
> if I restart (perl ./bin/app.pl) and repeat exactly what I was doing prior to the crash, it usually works just fine.

Are you using a persistent Session store?  If so, and emptying it between stopping and restarting the app now makes the symptom reproducible, you know the problem is due to data cached in the Session object.

In that case, I’d guess you’ve put “undef” into a variable and are now trying to use it in a context where a defined value is expected.

This includes the Dancer::Session::Cookie option: if you’re using that and fail to toss the browser’s cookies between tests, you aren’t starting from a fresh state.

*Something* must be persisting between app runs to cause it to have differing behavior from one run to the next, so if it isn’t the Session/Cookie, then it’d have to be your app’s backing data store, whatever that is.

If chasing all of the persistence layers in your app doesn’t bring you to a solution, I’d start removing large chunks of code until the problem went away, then perform a binary search on the last chunk removed to pare the problem down to a single line.

> Is this a known problem?

When chasing problems in a widely-used infrastructure component like this, always suspect your own code first.
_______________________________________________
dancer-users mailing list
dancer-users at dancer.pm
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20190312/a8792d65/attachment.html>


More information about the dancer-users mailing list