Home  >  Article  >  Backend Development  >  内存满了的情况下,Session存储是怎么处理

内存满了的情况下,Session存储是怎么处理

WBOY
WBOYOriginal
2016-06-13 12:07:172166browse

内存满了的情况下,Session存储是怎么办
内存满了的情况下,Session存储是怎么办,如标题~
------解决思路----------------------
session 默认情况下是存储在硬盘上的以sessionid命名的文件。

具体可参见php.ini中
session.save_handler

默认值是 files 文件存储。

如果是使用memcache或者其他缓存方式在内存中存储,在内存空间不足的情况下会存储失败,也就是内存溢出的情况。
此时需要设置报警或者检测机制,在存储前检测内存空间使用情况,如果不足就需要对就数据进行清理。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn