.allDocs not working

124 views
Skip to first unread message

Alan Macleod

unread,
Sep 23, 2013, 9:33:32 PM9/23/13
to pou...@googlegroups.com
I'm pre-populating my pouchdb by first fetching all the docs from a couchdb. My code:

var r_q_db = new PouchDB('http://usr:p...@mysite.com:5984/quests');
r_q_db.allDocs({include_docs: true}, enyo.bind(this, function(err, response) {
if (err){
alert("Could not retrieve the Questions data bank! Insure you have a strong internet connection.");
}else{
//code to batch insert into local pouchDB
}

I keep getting the err.
but
I have the same code working on another couchdb with no issues.

The main difference between two db's is the size. the working db is only 200 or so docs and the non-working db is 1500 docs, not a lot either...

Is there a limit to the number of docs obtained this way? What else might be going on?

Alan Macleod

unread,
Sep 23, 2013, 9:47:49 PM9/23/13
to pou...@googlegroups.com
Got it working...had some design docs that must have been corrupting something...deleting them fixed the issue.



On Monday, September 23, 2013 9:33:32 PM UTC-4, Alan Macleod wrote:
I'm pre-populating my pouchdb by first fetching all the docs from a couchdb. My code:

var r_q_db = new PouchDB('http://usr:pw@mysite.com:5984/quests');
r_q_db.allDocs({include_docs: true}, enyo.bind(this, function(err, response) {
if (err){
alert("Could not retrieve the Questions data bank! Insure you have a strong internet connection.");
}else{
//code to batch insert into local pouchDB
}
Message has been deleted

Alan Macleod

unread,
Oct 4, 2013, 9:09:55 AM10/4/13
to pou...@googlegroups.com
Not working again.

With the previously referenced code I get the following err: Object {status: 200}

I get the expected json.

Dale Harvey

unread,
Oct 6, 2013, 7:22:46 AM10/6/13
to pou...@googlegroups.com
Hey Alan

Sorry your previously referenced code is missing, not much to go on debugging here, got an example of the code + data that is failing?

Cheers
Dale


--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pouchdb/a58e96a4-2958-4eef-9dac-3218bae23c19%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alan Macleod

unread,
Oct 6, 2013, 10:36:55 AM10/6/13
to pou...@googlegroups.com
Thanks for the reply, Dale...

I'm just connecting to a remote couchdb to get all docs:

var r_q_db = new PouchDB('http://usr:pw@mysite.com:5984/quests');
r_q_db.allDocs({include_docs: true}, enyo.bind(this, function(err, response) {
if (err){
alert("Could not retrieve the Questions data bank! Insure you have a strong internet connection.");
}else{
//code to batch insert into local pouchDB
}

Keeping getting err

If I use the same code to get docs from a different DB on the same server it works fine.
I see no other issues with the Couchdb when accessing it in the browser but I assume its an issue with that DB.

It has about 1500 docs so I would not think its a size issue?

Alan Macleod

unread,
Oct 8, 2013, 9:28:17 PM10/8/13
to pou...@googlegroups.com
Just need to know if the problem is with the couchdb database on the server and if so how the problem may have occurred and how I can avoid it in the future.

Dale Harvey

unread,
Oct 10, 2013, 5:48:29 AM10/10/13
to pou...@googlegroups.com
Its pretty unlikely its a problem with couchdb, we page results to allDocs and I know its been working fine with large amounts of results (although never ideal to be collecting them unbounded in a single result)

Will do some testing and get back to you, but really need reproducable error steps to be certain of a fix


On 9 October 2013 02:28, Alan Macleod <sty...@gmail.com> wrote:
Just need to know if the problem is with the couchdb database on the server and if so how the problem may have occurred and how I can avoid it in the future.

--
You received this message because you are subscribed to the Google Groups "PouchDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pouchdb+u...@googlegroups.com.
To post to this group, send email to pou...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages