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 294597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:22:53+00:00 2026-05-12T06:22:53+00:00

I have been working in trying to optimize a webservice that is required to

  • 0

I have been working in trying to optimize a webservice that is required to return somewhat quickly (less than 1 second) and is required to maintain a high load of requests (greater than 1000/second). We are using memcached as a way to store objects “in memory”. It seems we are getting a large number of timeout errors from memcache.

[Thu Jul 23 22:59:42 2009] [error] [client 123.456.789.10] PHP Warning: Memcache::connect() [memcache.connect]: Can’t connect to 127.0.0.1:11211, Connection timed out (110)

So, on to the questions.

  1. Is a good use of memcache to store objects in memory that are time consuming to create? Would APC be a better location for these objects? The number of reads and

  2. Are there common pitfalls that I am overlooking in setting up memcache to work more efficiently?

Thanks for any help, I am somewhat new to working with memcache, and I think there is something I am missing.

  • 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-12T06:22:53+00:00Added an answer on May 12, 2026 at 6:22 am

    To answer your first point :

    • The power of memcached is that it allows to create a cluster of cache servers : it is not meant to be used on a single server (event it you can use it that way)
      • the theory is you have many servers, and each one has some free RAM you have no use for
      • to use this RAM, you install memcached on these servers, and configure it to use the amount of RAM that wasn’t used
      • and if one machine is down, it automatically stops using it, and put load balance the data on the others
      • the drawback of memcached (for some people) is that it’s network based (even when you use it on only one machine) ; which means a bit slower that “local-only”
    • APC works on only one machine : it is great (used as a caching mecanism) to store data you only need on one server, or if you only have one server ; and don’t have more data that what you can store in RAM.
      • main drawback would be that it absolutly does’nt scale : it’s thought for one machine ; if you have 10, you will have to have the same data 10 times, one time on each machine.
      • APC is said to be about 5 times faster to get data, as it’s local, and non-network-based.

    One thing to about APC : if you use it for it’s opcode cache ability (you should), make sure you configure it to have enough RAM for opcode+cache (so that it doesn’t run out of memory for opcode cache, which would be bad)

    If you need more (specific) help with memcached and don’t get much help here, there is a mailing-list, which is sometimes quite active ; maybe trying there could be useful.

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

Sidebar

Related Questions

I have been working on this for 24 hours now, trying to optimize it.
I have been working with a 3rd party java based REST webservice, that returns
So I have been working and trying for a couple of hours. I am
I have been working on this problem for a while now. I am trying
I have been trying for 4 days to get app-engine and grails working together
I have been going mad trying to figure out why my scripts weren't working,
I am working on a little WinForm app and have been trying to find
I have been working with a string[] array in C# that gets returned from
I am very new to javascript and ajax/jquery and have been working on trying
I have been working with SharpSVN quite a bit lately and I'm currently trying

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.