vbucket creation issues
Hi,
How to use Vbackets?
I have 4 tables that need to be created.so 4 vbackets.
Initially I have the default bucket with the it set to all the memory space.(2.39GB)
than I Modified the default bucket to 590MB
than created one more bucket of size 500MB and saved.
=
After that I get continouisly
memcached.exe Application Error:
The Instructions at "oxo34b8bea" referenced memory at "0x474e55a3". The Memory could not be read.
Click on OK to terminate the program.
click on Cancel to debug the program.
==
and
Memcached.exe encountered a problem and ned to be closed.
send Error Report ; Dont sen.
==
so,when I deleted the new bucket I created I dont see this ERRIR.
but when I run by program it will give "SERVER_BUSY" error.
1) what are the condictions I should take into account when I create a bucket?(other than space)
2) Is there any sample program with 2 buckets utilisation?
3) I have the default Bucket replication Enabled.
But I dont have any Servers. so if I create a new bucket with replication OFF will it be an issue?
4) Can you please let me know why I am getting the above Errors after creating the bucket?
5) How do I restart the Database in windows?
I am still having issues if I try to create more than one bucket on my windows machine.
Can you please let me know what I am missing?
Adi, the original error you've posted seems like a problem with the memcached process crashing.
-Can you please tell me what version of Windows you're using?
-Can you also grab the output of http://:8091/diag and send that to 'perry -at- couchbase -dot- com'? (you'll want to compress it before sending)
To address your other questions:
Let's first move away from using the term 'vbucket' since that is an underlying concept of the way Membase stores and distributes data. What you are referring to are simply "buckets" that get created and managed by the administrator.
1) what are the condictions I should take into account when I create a bucket?(other than space)
[pk] - You'll want to review our sizing guidelines when deciding how much RAM to give a bucket: http://www.couchbase.org/wiki/display/membase/Sizing+Guidelines
2) Is there any sample program with 2 buckets utilisation?
[pk] - We have plenty of customers using multiple buckets, it seems like you're running into some unknown bug at the moment.
3) I have the default Bucket replication Enabled.
But I dont have any Servers. so if I create a new bucket with replication OFF will it be an issue?
[pk] - I don't really understand this. You "have" to have at least 1 server in order to create the bucket. When dealing with replicas, the Membase software will create as many replicas as it can (based on the number of servers) and then present a warning if that doesn't match how many you've configured.
For example, if you create a bucket with a replica count of 2 and only have 1 server, you'll get warning but nothing "bad" will happen. When you add the 2nd (and 3rd) servers to the cluster, Membase will create the appropriate replicas and the warning will go away.
A replica count of '0' is perfectly valid, although it means that you can't "failover" when a server goes down.
4) Can you please let me know why I am getting the above Errors after creating the bucket?
[pk] - I'll need the above requested information and logs to help determine why you're having this problem. The error that you're actually getting ("SERVER_ERROR") is because the memcached process is crashing.
Now, as for connecting your client to Membase:
There are two types of clients:
-"legacy" clients which only implement the standard memcached protocol. These clients are required to go through a Moxi process (our proxy) in order to connect to Membase. You can read more about Moxi here: http://www.couchbase.org/wiki/display/membase/Moxi. Older versions of spymemcached are this type of client and you can connect to Membase by using this code:
MemcachedClient cache = new MemcachedClient(new InetSocketAddress(server, port));
If you want to connect to multiple buckets, you can configure each bucket to live on a different port and then tell spymemcached to use the different ports to connect to different buckets:
MemcachedClient default_cache = new MemcachedClient(new InetSocketAddress(, 11211)); ---->connects to default bucket
MemcachedClient different_cache = new MemcachedClient(new InetSocketAddress(, 11212)); ---> connects to a different bucket, configure that bucket to be on port 11212 within Membase
-"smart" clients. These clients can connect to Membase's REST API and get the benefits of dynamic scalability, etc. without having to go through the proxy. The latest version of spymemcached (available here: http://www.couchbase.org/wiki/display/membase/prerelease+spymemcached+vb...) has been updated to be one of these clients.
Using that client, you can connect to multiple buckets by using:
default_cache = new MemcachedClient(baseURIs, "default", "default", ""); -->connects to the default bucket
different_cache = new MemcachedClient(baseURIs, "different_bucket", "different_bucket", "");
(The reason you need the bucket name twice is because the client supports using a different username to connect while the server uses the name of the bucket both as a user name and as an identifier)
Lots of information in there, hope it helps Adi.
Perry
Thanks again Perry for a detail information.
-Can you please tell me what version of Windows you're using?
>Version: 1.6.5.4
>Cluster State ID: 016-010-16
-Can you also grab the output of http://:8091/diag and send that to 'perry -at- couchbase -dot- com'? (you'll want to compress it before sending)
I am not able to download this document.
when I try to download , it gives downloading: ns-diag-2011060606330.txt and times out.
My server is up and running.I trid in iexplorer and Firebox.
HI Perry,
I was able to download now.
I attached and send you the logs to your mail box
Question 5 is clarified.
I used service_start.bat/stop in windows and it worked.
=
Can you also please give me a example how I can use MemcachedClient to access vbucket other than the default.
I have in my programs :
MemcachedClient cache = new MemcachedClient(new InetSocketAddress(server, port)); which is the default vbucket.
how can I set to a vbucket other than default?
mc = new MemcachedClient(baseURIs, "bucket_name", "bucket_name", "bucket_password", true);
I saw this command in one of the posts. but why are there 2 bucket_names?
can you please provide me with a example so that I can call the 2 buckets in the same client program?
sorry of this is basic question as I was new to this