Couchbase server does not create any document - ramQuotaMB:RAM quota cannot be set below current usage
Hello!
I have 2 buckets on my Couchbase server: default and new bucket named "Class"
I try to create very simple document in "Class" by curl command:
[root@tstnix ~]# curl -X POST http://127.0.0.1:8091/pools/default/buckets/Class -d '{"code":"7","nam":"culture"}' -H Content-Type:application/json
but I have got the reply:
{"errors":{"ramQuotaMB":"RAM quota cannot be set below current usage."},"summaries":{"ramSummary":{"total":1073741824,"otherBuckets":104857600,"nodesCount":1,"perNodeMegs":0,"thisAlloc":0,"thisUsed":13660524,"free":968884224},"hddSummary":{"total":3.584e+10,"otherData":1430709583,"otherBuckets":356113,"thisUsed":2534304,"free":34408934304.0}}}
The Couchbase Console gives me:
Buckets
Bucket Name Bucket Type Bucket Resides On RAM Usage/Quota Disk Usage
Class Couchbase 1 server 13MB/924MB 2.41MB
default Couchbase 1 server 0B/100MB 347KB
why does this error arise? and what must I do for creating documents?
Couchbase uses the memcached protocol to create documents. Since Couchbase contains couchDB technology inside it is possible to create documents with HTTP but it isn't very straightforward since we actually create 256 databases per Couchbase bucket. You are also not connecting to the couchDB port in your example. Port 8091 is the Couchbase admin interface.
I can get more into detail if your interested in why you shouldn't use HTTP protocol for creating documents. I recommend that you download one of our SDK's to get started. There are also a few tutorials to help you get something up and running quickly. The link to the SDK page is below.
http://www.couchbase.com/develop