Is the session destruction mechanism in PHP asynchronous?
漂亮男人
漂亮男人 2017-05-16 13:11:23
0
2
401

According to the default configuration, the session in PHP will enter the destruction process of expired session files after 24 minutes and a probability of 1/1000 is triggered. Will this process be synchronized with the request processing process? Or will an asynchronous process be started? If it is the former, won't it block the execution of this request?

漂亮男人
漂亮男人

reply all(2)
phpcn_u1582

It is not asynchronous and will indeed block the user request, so it needs probability to start.

仅有的幸福

It’s not asynchronous. Every time PHP accepts a request, there is a certain probability to clean up the expired session. This probability is controlled by these parameters

session.gc_probability = 1
session.gc_pisor = 1000
session.gc_maxlifetime = 1440
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template