How to keep extending session life when user is active?

前端 未结 5 574
情书的邮戳
情书的邮戳 2021-02-04 08:58

Let\'s say there\'s a site/system with a logged in member area, and users are rarely, but very inconveniently logged out while working with the site/system.

It\'s doubt

5条回答
  •  隐瞒了意图╮
    2021-02-04 09:45

    I presume you are using built in PHP file session storage? There are known race conditions problems with it.

    I had similar issues with loosing session id's when there were concurrent requests from same session id. Since file was locked by first request all other concurrent connections were unable to access file and some of them generated new session id. Those situations were also very rare and it took me time to locate the problem. Since then I'm using memcached for session storage and those problems vanished.

提交回复
热议问题