Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

Clearing the cache (flushing) nightly

2 replies [Last post]
  • Login or register to post comments
Mon, 04/02/2012 - 05:43
ccolumbu
Offline
Joined: 03/18/2012
Groups: None

I have what I hope is a simple question.
I want to flush the cache (empty it) nightly at midnight.

I have a cron that will do this:
/opt/couchbase/bin/couchbase-cli bucket-flush -c 127.0.0.1:8091 --bucket=default
/etc/init.d/couchbase-server restart

Questions:
Do I have to do this on all 5 of the servers in the cluster, or if I do it on one will that clear/empty/flush all of them?

If I do only need to do this on one server is there a master or preferred server? I don't see anything like a master/preferred server in the docs or web interface, so I am guessing any server will do.

If I only have to flush on 1 server do I need to restart them all, or just the one I flushed?
When I tested this, the server I flushed (I only had one at the time) stopped working until I restarted it.

Thanks for your help.
^C

Top
  • Login or register to post comments
Tue, 04/03/2012 - 22:48
ingenthr
Offline
Joined: 03/16/2010
Groups:

You should only need to do this against one server. The bucket on the whole cluster will be flushed. By design, there is no master in the cluster. All nodes are like all other nodes.

You shouldn't need to restart that server either.

That said, we have had some issues related to flush, and bucket delete/recreate is more reliable, though also has some issues. These are being worked on.

Top
  • Login or register to post comments
Wed, 04/04/2012 - 00:45
ccolumbu
Offline
Joined: 03/18/2012
Groups: None

So we tested this, you have to flush each machine with:
/opt/couchbase/bin/couchbase-cli bucket-flush -c 10.1.1.140:8091 --bucket=default
/opt/couchbase/bin/couchbase-cli bucket-flush -c 10.1.1.141:8091 --bucket=default
...
/opt/couchbase/bin/couchbase-cli bucket-flush -c 10.1.1.149:8091 --bucket=default

and then restart the service for the machine that is acting as the proxy (which we will be going away from moxi soon it has too many issues) with:
/etc/init.d/couchbase-server restart

So I wrote a little script that runs the flushes all from the proxy then restarts the couchbase server

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker