[dancer-users] Dancer crashing

Warren Young warren at etr-usa.com
Tue Mar 12 20:58:20 GMT 2019


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.


More information about the dancer-users mailing list