且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在我的应用程序中,我无法更改会话时间。它从其他地方覆盖。

更新时间:2021-07-10 23:33:39

你的网络托管服务很可能将会话超时限制在10分钟 - 因为每个活动会话需要保留服务器内存,直到会话到期为止,某些主机服务将其限制为低于标准的20分钟是很常见的。将每个会话延长到180分钟可能会占用大量服务器资源,主机希望避免这种情况。



要么与您的托管服务交谈,要么***停止使用会话并使用Cookies。
It's quite possible that your web hosting service is restricting the session timeout to 10 minutes - since each active session takes server memory which has to be retained until the session expires, it's quite common for some hosting services to restrict it to less than the standard 20 minutes. Extending each session to 180 minutes could occupy a significant amount of server resources, which hosts would like to avoid.

Either talk to your hosting service, or better stop using the session and use Cookies instead.