Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Session destroyed out of nowhere in PHP

I am experiencing issue with a session being destroyed out of nowhere:

session_start(): Failed to decode session object. Session has been destroyed.

Kind of impossible to replicate the issue since I got this thrown in my server log.

Any ideas what could be the roots of that problem and/or where to start because I am getting that very rare (almost never).

like image 252
radioaktiv Avatar asked Jan 22 '16 10:01

radioaktiv


Video Answer


1 Answers

This happened to me when I was storing too much in $_SESSION where they were saved using serialize() in a table. Solution: don't store too much.

like image 59
Luke Wenke Avatar answered Nov 07 '22 08:11

Luke Wenke