memcached-php using Windows Memcache do Session_handler inexplicably lost

Source: Internet
Author: User
Symptoms

There are two files of set_session.php and read_session.php. Access the set_session.php and plant the session data. Then access read_session.php, found session data read normal. It is normal whether to refresh read_sesion.php after 5 minutes or to access it again in another file.
But if I press and hold the F5 key (note is hold), release after about 5 seconds (that is, the browser refreshes dozens of, hundreds of times in a short period of time), read_session.php feedback out of the session is empty. Then took the session_id to Memcache, found that the key exists, but value is empty.

Environment

The server is Windows Server 2003 32bit. Using the xampp3.1.0,php version is 5.4. The PHP configuration is as follows:

Session.save_handler = Memcachesession.save_path = "127.0.0.1:22003" Session.auto_start = 1

MC version is 1.4.4, from HTTP://DOWNLOADS.NORTHSCALE.COM/MEMCA ... Downloaded, DLL is http://windows.php.net/downloads/pecl ...

the weird place .

I can be sure: the memory is definitely not full, no one else has access to the server, and no other apps are running on it.
completely the same XAMPP/PHP/MC configuration, in my local windows7 (64bit) above, there is no problem. If I replace the Session_handler on the server with files, there is no problem. Finally we suspect is the connection number or win03 aspects of the problem, found that win03 in the TCP connection there is no limit, if it is win03 kernel problem, I also wood have method. ╮ (╯_╰) ╭

This problem has been tossing all day, and finally decided to abandon Memcache storage, wait until the switch to Linux and then use MC Storage, anyway, there is no high load. But we use MC to store other data, such as merchandise ah, classification Ah, or Smarty cache, are very normal, but the session can not be loaded.

Reply content:

Symptoms

There are two files of set_session.php and read_session.php. Access the set_session.php and plant the session data. Then access read_session.php, found session data read normal. It is normal whether to refresh read_sesion.php after 5 minutes or to access it again in another file.
But if I press and hold the F5 key (note is hold), release after about 5 seconds (that is, the browser refreshes dozens of, hundreds of times in a short period of time), read_session.php feedback out of the session is empty. Then took the session_id to Memcache, found that the key exists, but value is empty.

Environment

The server is Windows Server 2003 32bit. Using the xampp3.1.0,php version is 5.4. The PHP configuration is as follows:

Session.save_handler = Memcachesession.save_path = "127.0.0.1:22003" Session.auto_start = 1

MC version is 1.4.4, from HTTP://DOWNLOADS.NORTHSCALE.COM/MEMCA ... Downloaded, DLL is http://windows.php.net/downloads/pecl ...

the weird place .

I can be sure: the memory is definitely not full, no one else has access to the server, and no other apps are running on it.
completely the same XAMPP/PHP/MC configuration, in my local windows7 (64bit) above, there is no problem. If I replace the Session_handler on the server with files, there is no problem. Finally we suspect is the connection number or win03 aspects of the problem, found that win03 in the TCP connection there is no limit, if it is win03 kernel problem, I also wood have method. ╮ (╯_╰) ╭

This problem has been tossing all day, and finally decided to abandon Memcache storage, wait until the switch to Linux and then use MC Storage, anyway, there is no high load. But we use MC to store other data, such as merchandise ah, classification Ah, or Smarty cache, are very normal, but the session can not be loaded.

Memcached is not suitable for storing sessions when the session count exceeds a certain value.

Memcache uses slab memory pre-allocation, fixed-length key number is limited, if the number of full will be based on LRU Delete key, resulting in loss.

  • 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.