PHP & Memcached Connection Status

Source: Internet
Author: User

  
   addServer('不存在的别名', 11211);$m->set('int', 99);$m->set('string', 'a simple string');$m->set('array', array(11, 12));/* 'object'这个key将在5分钟后过期 */$m->set('object', new stdclass, time() + 300);var_dump($m->get('int'));var_dump($m->get('string'));var_dump($m->get('array'));var_dump($m->get('object'));?>

found that the memcached connected a nonexistent alias, set, blocked, and then 502, what error, the exception is not given.

Checked the manual, and did not find how to detect the state of the memcached, how did you do?

Reply content:


  
   addServer('不存在的别名', 11211);$m->set('int', 99);$m->set('string', 'a simple string');$m->set('array', array(11, 12));/* 'object'这个key将在5分钟后过期 */$m->set('object', new stdclass, time() + 300);var_dump($m->get('int'));var_dump($m->get('string'));var_dump($m->get('array'));var_dump($m->get('object'));?>

found that the memcached connected a nonexistent alias, set, blocked, and then 502, what error, the exception is not given.

Checked the manual, and did not find how to detect the state of the memcached, how did you do?

Check server status with $m->getstats () after Addserver

There is an open source memadmin, which is a web-based memcached management and monitoring tool developed using PHP.

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