Hi,
I have been created point of sale application. It is android and ios application. User can add products and sale. User can view sales report from web application(php). I am using couchbase server 5.1 and sync gateway 1.5. I have tested slow and loading issues with more than 30,000 records. I have noted the slowness and loading issue. I changed couchbase server capacity. but still the problem is there. I am unable to solve this issue. Sometime user unable to login into application due to loading issue. Can you help me?
This is my sync_gateway json code.
{
“log”: [""],
“adminInterface”: “0.0.0.0:4985”,
“interface”: “0.0.0.0:4984”,
“databases”: {
“pos”: {
“server”: “http://admin:1234@127.0.0.1:8091”,
“bucket”: “pos”,
“users”: {
“admin”:{“password”:“test1234”, “admin_channels”: [""]},
“user1”: {“password”: “pass”, “admin_channels”: [“user1”]},
“user2”: {“password”: “pass”, “admin_channels”: [“user2”]}
},
“allow_conflicts”: false,
“revs_limit”: 20,
"sync": `function(doc, oldDoc)
{
if (!isDelete()) {
if (doc.type == "product") {
var chanl =doc.store_name;
channel(chanl);
access(doc.owner,chanl);
} else if (doc.type == "sale") {
var chanl =doc.store_name;
channel(chanl);
access(doc.owner,chanl);
}else{
log("Invalid document type: " + doc.type);
throw({forbidden: "Invalid document type: " + doc.type});
}
}
function isDelete() {
return (doc._deleted == true);
}
}`
}
} }
Do i need to change my config file ?
This is my couchbase server. I haven’t add more node. i have single node. Do i need to add more nodes? Is it the reason for slow?
Thank you.