Memcached Timed out (x milliseconds) waiting for operation while CONNECTE troubleshooting

Source: Internet
Author: User
Tags memcached set time

The system uses memcached, the client uses xmemcached2.0, and the recent system executes Memcachedclient's Get method has been reported error "memcached Timed out (x milliseconds) Waiting for operation while Connecte ", where the red X is the set time-out. Because I have a lack of knowledge of memcached, so the first troubleshooting also encountered a lot of problems, here simply next steps for other and I like the small white groping.

First of all, according to other users of the data, suspicion is the number of service-side connections exceeded, but the data said the default memcached the maximum number of connections is 1024. Our client side of the "connectionpoolsize" configuration is 300, far smaller than this number AH. So what is the number of service-side? How to view? After finding the data, you can use Telnet to view it if the Telnet command on your machine does not open and needs to be opened.

First step: Start the Telnet client in cmd, similar to the following: Telnet localhost 11211, you can replace localhost with your own IP. This time will pop up a black interface, there is nothing on top.

The second step: do not worry, you enter the command "stats", if after a minute of time this interface is still unresponsive, it means that the Memcached server connection number has exceeded its load capacity. At this point you need to set the number of ConnectionPoolSize connections for the client to be smaller. Remember, it is best to restart the memcached server, or it is often not connected. Then repeat the first and second steps above, until the connectionpoolsize is set to small enough for the server to connect. This time connectionpoolsize is your current memcached number of connections that can be hosted.

The third step: after connecting, you can see the current number of connections, such as I am here: STAT curr_connections 51.

The above is to solve the problem of view server connection, incidentally verified their own speculation, the problem found a way to solve the problem of increasing the number of connections, this is something.

Here temporarily left a problem: Online data said memcached server default maximum number of connections is 1024, but why I here to 50 can no longer connect, too late to understand the problem later.

Memcached Timed out (x milliseconds) waiting for operation while CONNECTE troubleshooting

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.