Memcache schoonersockiopool-attempting to get Sockio from uninitialized pool! Problem

Source: Internet
Author: User

Today's test Memcache connection error

Schoonersockiopool-attempting to get Sockio from uninitialized pool!

The reason for the error should be the connection pool that did not initialize the memcachedclient, but the connection pool was initialized,

Sockiopool pool = sockiopool.getinstance ();
		if (pool = = null) {
			log.error ("Failed to Sockiopool.getinstance");
		}
		Pool.setservers (p.servers);
		if (p.weights!= null) pool.setweights (p.weights);
        if (p.initconn!= null) pool.setinitconn (p.initconn);
        if (p.minconn!= null) pool.setminconn (p.minconn);
        if (p.maxconn!= null) pool.setmaxconn (p.maxconn);
        if (p.buffersize!= null) pool.setbuffersize (p.buffersize);
        if (p.maxidle!= null) pool.setmaxidle (p.maxidle);
        Initialize and start the connection pool
        pool.initialize ();
        Mccclient = new Memcachedclient (label);
Breakpoint to new memcachedclient found connection pool did not refresh, finally found the problem, sockiopool.getinstance (), should also add alias,

The correct is sockiopool.getinstance (label);


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.