Session disappear

I added a session and leave my browser for 2 hours and when I come back my session is gone, but my identity is still stay there:




$session = Yii::$app->session;

$session->set('my_session', time());

\yii\helpers\VarDumper::dump(Yii::$app->formatter->asTime($session->get('my_session')),10,1);



This is my php.ini file: http://tongtoanbs.github.io/staging-ini/

My Yii2’s config: https://gist.github.com/tongtoanbs/0f872c95f764e0b6dc43#file-main-php

One thing I found is the cookie ‘PHPSESSID’ is changed:

When I set the session: 7ji7n8v0ocgdeevrntvcqla8n1, expire: 2016-04-09T02:14:53.423Z

After the session disappear: 4td6fdogfmfadke85k2r4efut3, expire: 2016-04-09T04:18:21.026Z

it seems like Yii2 regenerate the session id in cookie.

This issue happened on my google cloud server running PHP7 on debian, and my colleague laptop running php7 on Linux Mint. It doesn’t happen on my local using Mac 10.11.3 and php7.