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

  • Home
  • SEARCH
  • 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 6318865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:42:01+00:00 2026-05-24T15:42:01+00:00

I’ve been using php 5.2 and Apache 2.2 and memcached 1.2.6 for a long

  • 0

I’ve been using php 5.2 and Apache 2.2 and memcached 1.2.6 for a long time, with client-side sharding across a number of hosts. This has worked fine AFAICT. Recently, I’ve started upgrading memcached clients to php 5.3. This comes from ubuntu server 10.04 LTS.
However, I’m starting to see a weird bug, where the value for some other key comes back, say once every 1,000,000,000 requests or so (that I know of). I have not been able to yet decide whether this is corrupting on store or load (debugging happens after data has expired).
The corrupted data returned from a get has sometimes been a value from a totally different key, and has also sometimes been a single element from within the array value that the key is supposed to have.
Searching the web finds no obvious mention of these symptoms, but that’s a hard search to get hits for, because most discussions are related to application-level race condition bugs. I have proven to myself that this is not one of those.

So, is this a known bug somewhere in this stack? Any others with similar experiences? Thanks in advance!

To answer some questions:

  • Yes, it’s an old version. It’s been working well for a very long time. Thus, I don’t think it’s the server screwing up (but I guess it could be). We tried upgrading to 1.4.5 but it failed tests, because we depend on some behaviors of older memcache that were incompatibly changed when upgrading. Fixing this will happen in the future, but you know the saying: if it ain’t broke….

  • Each sharded server machine (as well as the PHP clients) has 8 gigs of ECC RAM, so we’d know if there was a memory failure.

  • What I mean by the value of a different key is that, if I store, say, an array of email addresses into a key named “email_addresses_$id”, very infrequently, some later read-back of that key returns, say, a Python-pickled dict of product ids, which are only ever stored into a key named “product_ids_$serial” by totally different code. Also, very infrequently, we’ll get back a single email address, instead of a full array of email addresses (or an array of a single email address, which would be the expected case).

Also: I estimate that we push well over a terabyte of memcached traffic per day, so logging all of it to be able to go back and debug what happened on a failure we see one to three times a month is somewhat unlikely to be viable.

  • 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-24T15:42:01+00:00Added an answer on May 24, 2026 at 3:42 pm

    We have been able to reproduce this problem.

    It turns out that PHP memcached client library version 3 fails if the connection to memcached fails. It returns an error, but queues the data of the previous request. The next request that comes into the library will cause a new connection to open, and then use the key from the new request, but the data from the old request!

    It sounds crazy, I know, but it’s totally reproducible.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
I have a jquery bug and I've been looking for hours now, I can't
I'm looking for suggestions for debugging... If you view this site in Firefox or
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Does anyone know how can I replace this 2 symbol below from the string
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have just tried to save a simple *.rtf file with some websites and

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.