Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6653011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:12:51+00:00 2026-05-26T01:12:51+00:00

I am new to memcached but I do need to fix this error quick

  • 0

I am new to memcached but I do need to fix this error quick on the website

I don’t know where to cut in?

Anything that I can do to find out which node or key memcached failed to get?

Any log files can I look into?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:12:52+00:00Added an answer on May 26, 2026 at 1:12 am

    This occurs when you store an object which has references to recources such as file descriptors or database connections. It can also occur if the object you get is of a class which isn’t loaded when you get it from memcached.

    To find out which memcached key fails, you could set a custom error handler, which can access the memcached key, just before the call to Memcached::get and restore it afterwards. Then you can log the warning together with the key.

    [Edit] Here’s an example:

    <?
    class MyMemcachedWrapper {
    
        private $key;
    
        public function get($key) {
    
            // Save the key in an instance variable so it will be available in
            // the error handler
            $this->key = $key;
    
            set_error_handler(array($this, 'handleError'));
            $value = Memcached::get($key);
            restore_error_handler();
    
            return $value;
        }
    
        public function handleError($errno, $errstr) {
    
            // Here we have both the key and the error message from memcached
            $message = "Memcached error '$errstr' while fetching key '{this->key}'";
    
            // ... and we can log it to a file or db or something
            file_put_contents("memcached-errors.log", $message, FILE_APPEND);
        }
    }
    
    // Then use it like this
    $memcached_wrapper = new MyMemcachedWrapper();
    $value = $memcached_wrapper->get('xyz');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to WCF, but familiar with COM+ - can I wrap a WCF service
I have a perl script that uses the CGI::Session::Drive::memcached, but I want to be
Does anyone know IF , WHEN or HOW I can get Memcached running on
I'm busting my brains over this issue (it should be straightforward), but can't seem
New to javascript/jquery and having a hard time with using this or $(this) to
New to both Ruby and Rails but I'm book educated by now (which apparently
new Date(05-MAY-09 03.55.50) is any thing wrong with this ? i am getting illegalArgumentException
i am familiar with memcached and eager loading, but neither seems to solve the
I'm looking to use NorthScale's Memcached Server with Amazon EC2, I've launched a new
1) I understand I can call this $memcache_obj = memcache_connect('memcache_host', 11211); in the header

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.