About Session, login timeout

Source: Internet
Author: User
Tags tmp folder

The PHP5 session has a passive recovery mechanism (garbage collection). Expired session file is deleted automatically, but the expired session is processed by triggering the recycle mechanism

Each PHP request, there is a 1/100 chance to trigger the session recovery mechanism,

session.gc_probability = 1
Session.gc_divisor = 100

Expiration time setting of the session

Session.gc_maxlifetime = 1440 (default)

To see if the current session is out of date can be found in the/tmp folder, compared to the time

Encountered a problem, log on to the system has been prompted "login timeout", because the system has been able to run,

So can be introduced because,/tmp under the session_id no recycling caused.

There is another situation when your session.save_path is not in/TMP and may not trigger the session recovery mechanism,

I speculate that the reasons for not being recycled, should be the company's projects are different, but the use of session_id are the same majority, so that the mechanism of recycling can not be recycled currently running session,

My solution is to delete all the files in/TMP and run them with the new session.

About Session, login timeout

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.