vendredi 29 janvier 2016

Laravel 5.1 randomly dropping session data

I have a strange issue with a Laravel 5.1 application.

Intermittently, it’s dropping session data. I’m detected this by writing some middleware that writes the contents of the session for that request to the log file. Although the session ID (Session::getId()) doesn’t change, the value of _token in the session data retrieved with Session::all() does.

As I say, this happens intermittently. I can refresh the same URL multiple times, and then randomly on one refresh the session data’s gone, and the _token value’s different from the previous requests.

What would cause this? I’ve also noticed the flash object isn’t in the “dropped” session data.

Below is a snippet of the log. You can see the content of the session_data key randomly changes “shape” in the last two lines, but the session ID remains constant.

Also, not sure if it’s pertinent, but I have DebugBar enabled.

Screen-shot



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire