Flushing not working

I’m having trouble flushing my buckets. A have created several memcached buckets which I want to flush. Using the .NET API it throws an exception while creating the manager, so I thought that I would go through the REST api.

I try calling “http://localhost:8091/pools/default/buckets//controller/doFlush” with Basic Auth enabled. The call returns 200 OK, but nothing happens in couchbase UI. I can see that the flush was initialized in the Log, but the bucket is not flushed. I also tried playing with enabling and disabling flushing through REST API which works perfectly.

Please help.

Just found this issue: https://issues.couchbase.com/browse/MB-8685

What exception is thrown? Can you post it?


I’m getting a NotSupportedException.

System.NotSupportedException : Specified method is not supported.
at Couchbase.MemcachedBucket.CreateManager(String username, String password)

For now, we are deleting and recreating the buckets.

@msb -

I created a Jira ticket for this: https://issues.couchbase.com/browse/NCBC-1148

Note that CreateManager works as expected for CouchbaseBuckets, so you may want to consider going the persistent route. Otherwise, you can wait for that ticket to be fixed in either 2.3.2 or 2.3.3.


Hi, i cannot flush the memcached bucket on couchbase server as well. I tired below ways, but none of them work

  1. Using Enyim.Memcached library. I can set and get but nothing happen (i can still get without another get) using memcachedclient.flushAll().

  2. Telnet to couchbase server with the port of the memcached bucket. I can run stats command and return something. However, after i run flush_all, just return OK and i can still get the object without another set

Please help.

@alantong -

1st, make sure flush is enabled from the management console. 2nd, try upgrading from the Enyim.Memcached to the official Couchbase 2.3 client: https://www.nuget.org/packages/CouchbaseNetClient/

Lifecycle for 1.X clients can be found here: http://couchbase.com/support-policy


Hi Jeff, thanks so much for your reply. How to config and use the official Couchbase 2.3 client for the memcached bucket on couchbase?? I use Enyim because I cannot find any examples to teach people how to config and use CouchbaseNetClient for memcached bucket (most of docs are for Data Buckets instead of Memcached Buckets). Would you provide some examples for how to config and use (maybe just how to use CouchbaseNetClient to flush the memcached bucket) with CouchbaseNetClient? Or any tips for me to search on Google? Thanks

1 Like


The configuration for a memcached bucket in the .Net client is basically the same as for a Couchbase bucket. There are just some advanced features like enhanced durability that you leave turned off (which is the default).

Here are the general configuration instructions, they should work fine for a memcached bucket.

To send the flush command:

var bucket = ClusterHelper.GetBucket("my-bucket");
var manager = bucket.CreateManager("Administrator", "adminPassword");

There is also an asynchronous implementation, FlushAsync().


Thanks Brant and Jeff, you really save my life. Below showed the web.config and my coding for flushing the memcached bucket to help people with the same problems


  <sectionGroup name="couchbaseClients">
    <section name="couchbase" type="Couchbase.Configuration.Client.Providers.CouchbaseClientSection, Couchbase.NetClient" />

      <add uri="http://your_server_ip:8091"></add>
      <add uri="http://your_server_ip:8091"></add>
      <add name="memcached_bucket_name">
        <connectionPool name="custom" maxSize="6" minSize="4"/>


var bucket = ClusterHelper.GetBucket("memcached_bucket_name");
var manager = bucket.CreateManager("Admin", "Admin_Password");
1 Like