Re: Understanding local_seq in CouchDB 2.x

2019-01-23 Thread Nathan Vander Wilt
89252-BA26-43F5-BD0B-62A6814EF904%40apache.org%3E hth, -nvw On Thu, Jan 17, 2019 at 4:26 PM Nathan Vander Wilt wrote: > I'm updating some code and wondering how I should understand local_seq in > the CouchDB 2.x era: > > > Is the doc._local_seq field still guaranteed to be inc

Re: Understanding local_seq in CouchDB 2.x

2019-01-22 Thread Nathan Vander Wilt
mbers in the changes feed *were* the local_seq. But now the changes feed provides only the global sequence. For consistency with view generation and document fetches it would be nice to have this available to change watchers as well. thanks, -natevw On Thu, Jan 17, 2019 at 4:26 PM Nathan Vander

Understanding local_seq in CouchDB 2.x

2019-01-17 Thread Nathan Vander Wilt
I'm updating some code and wondering how I should understand local_seq in the CouchDB 2.x era: Is the doc._local_seq field still guaranteed to be incremental and unique for documents within a database stored only on a single-node? Or does it now apply only at the shard level? If I do ever migra

Re: Extra 500 reply added to list function response when accessed through rewrite

2017-06-21 Thread Nathan Vander Wilt
admit this is a bit of a corner > case. > > https://github.com/apache/couchdb/issues > > I'm not able to dig in on your specific bug right now, but perhaps someone > else can > shed some light? > > Thanks, > Joan > > - Original Message - > From

Extra 500 reply added to list function response when accessed through rewrite

2017-06-20 Thread Nathan Vander Wilt
I am getting strange responses from CouchDB 2.0.0 when accessing a list handler through a rewrite. The result to my single request is two responses: the expected one, plus an extra "unknown_error" 500 response. Over HTTP/1.1 this issue is masked because the extra response is not properly chunked

Re: Trying to get to bottom of another CouchDB crash scenario

2014-10-29 Thread Nathan Vander Wilt
below…). tired of this, -natevw On Oct 29, 2014, at 2:12 PM, Nathan Vander Wilt wrote: > I've now got a huge rash of crashes on another (slightly less critical) > production server. Some are similar to this. I did find one thread, which > seems about as inconclusive but d

Re: Trying to get to bottom of another CouchDB crash scenario

2014-10-29 Thread Nathan Vander Wilt
dencies/couchdb/src/mochiweb/mochiweb_http.erl"}, {line,94}]}, {proc_lib,init_p_do_apply,3, [{file,"proc_lib.erl"},{line,239}]}]}}, {ancestors, [couch_

Trying to get to bottom of another CouchDB crash scenario

2014-10-09 Thread Nathan Vander Wilt
Any idea what might have caused the second crash, at bottom of this email? Yesterday the same CouchDB server went down like this and didn't come back up: -- first crash heart: Wed Oct 8 10:31:25 2014: Erlang has closed. Segmentation fault (core dumped) sh: echo: I/O error heart:

badmatch on initial config file password

2014-07-01 Thread Nathan Vander Wilt
I am trying to set up CouchDB from a script, which makes a couch.ini config file that includes this line: [admins] admin = password On my local machine with CouchDB 1.5.0 that gets automatically hashed on first launch. However, when another developer on the project tries to start CouchDB 1.6.

Can't change user password, Badarg error in HTTP request (crypto,sha_mac_n)

2014-02-05 Thread Nathan Vander Wilt
I'm trying to manually set a new password for a user, but I get a 500 with a concerning stacktrace when I do so. Basically what I'm doing is pulling up the _users/org.couchdb.user:doc in Futon, deleting the password_sha and salt fields, and adding a new field `password` with the desired passwor

Re: Is startkey_docid as scalable as startkey?

2013-12-05 Thread Nathan Vander Wilt
re >>> the view key is the same, it is *not* a separate index. Views are in >>> key order only. >>> >>> under the covers, the true view key is actually [emitted_key_order, >>> doc._id], the rows are unique in the b+tree. >>> >>> B. >>

Is startkey_docid as scalable as startkey?

2013-12-05 Thread Nathan Vander Wilt
Let's say for every doc I `emit([doc.user])` and, when a user requests a document ID I have my middleware `GET …/docs_by_user?startkey=[req.user.name]&endkey=[req.user.name,{}]&include_docs=true&limit=1&startkey_docid=req.param.id`. I return the row's doc or 404 if the range is empty. Basically

Re: couchdb replication memory consumption

2013-11-18 Thread Nathan Vander Wilt
Sorry to hear you are having trouble. It's odd this started only in 1.5, otherwise I'd wonder if it were related to https://issues.apache.org/jira/browse/COUCHDB-1874 — that's an older bug. I know I've had trouble with large replications hanging lately too, but haven't been able to track it dow

Re: couchdb crashes silently

2013-11-11 Thread Nathan Vander Wilt
this, and adding another layer of twine and baling wire in the form of a _second_ shell watchdog script is not at all exciting >:-( regards, -natevw On Nov 1, 2013, at 9:17 AM, Nathan Vander Wilt wrote: > > On Nov 1, 2013, at 12:10 AM, Dave Cottlehuber wrote: > >>&

Re: couchdb crashes silently

2013-11-01 Thread Nathan Vander Wilt
On Nov 1, 2013, at 7:08 AM, Dave Cottlehuber wrote: > On 01. November 2013 at 08:10:22, Dave Cottlehuber (d...@jsonified.com) wrote: >> >>> On Oct 31, 2013, at 5:13 PM, Nathan Vander Wilt > >>> wrote: >> >> So there’s 2 things here >> >>

Re: couchdb crashes silently

2013-11-01 Thread Nathan Vander Wilt
On Nov 1, 2013, at 12:10 AM, Dave Cottlehuber wrote: >> On Oct 31, 2013, at 5:13 PM, Nathan Vander Wilt > >> wrote: >> >> Aaaand my Couch commited suicide again today. Unless this is >> something different, I may have finally gotten lucky and had >>

Re: couchdb crashes silently

2013-11-01 Thread Nathan Vander Wilt
I wrapped in a cron to clean up and restart as I was under > a timeline before the world nearly came to an end earlier this month. > > Jim Klo > Senior Software Engineer > SRI International > t: @nsomnac > > On Oct 31, 2013, at 5:19 PM, "Nathan Vander Wilt" >

Re: couchdb crashes silently

2013-10-31 Thread Nathan Vander Wilt
al.ini -s couch -pidfile production_couch/couch.pid -heart hth, -nvw On Oct 31, 2013, at 5:13 PM, Nathan Vander Wilt wrote: > Aaaand my Couch commited suicide again today. Unless this is something > different, I may have finally gotten lucky and had CouchDB leave a note > [eerily

Re: couchdb crashes silently

2013-10-31 Thread Nathan Vander Wilt
ld add my own cronjob or something to check and restart if needed every minute, but a) the shell script is SUPPOSED to be keeping CouchDB and b) it's NOT and c) this is embarrassing and aggravating. thanks, -natevw On Oct 29, 2013, at 9:42 AM, Nathan Vander Wilt wrote: > I am

Re: couchdb crashes silently

2013-10-29 Thread Nathan Vander Wilt
I am starting CouchDB 1.4.0 using `bc2/build/bin/couchdb -b -r 5 […output and configuration options…]` and keep pulling up my sites finding them dead too. Seems to be about the same thing as others are reporting in this old thread…was there any resolution? This is not an OOM thing, in dmesg I d

Re: Respawning server died, can't figure out why

2013-08-20 Thread Nathan Vander Wilt
On Aug 13, 2013, at 6:15 PM, Joan Touzet wrote: > On Tue, Aug 13, 2013 at 02:49:28PM -0500, Nathan Vander Wilt wrote: >> I've got 1.7GB disk free and 2GB of memory available at the moment, so it >> doesn't seem to be either of those. (I could not find any out-of-memory

Respawning server died, can't figure out why

2013-08-13 Thread Nathan Vander Wilt
I'm trying to keep a second instance of CouchDB running on a server, so I made it its own config file and start it in the background with respawning enabled: $~/build-couchdb/build/bin/couchdb -b -r 5 -a ~/some-instance/couch.ini -o ~/some-instance/couch.stdout -e ~/some-instance/couch.stder

Re: Get the 20 posts, of the last seven days, ordered by number of hits

2013-07-22 Thread Nathan Vander Wilt
If your "hit" document includes the post date, you could map with `emit([hit.post_date, hit.post_id])` and reduce with `_count`. Then you when queried with `?group=exact` you would have total hits per post and you could prune the results using startkey to last 7 days. You would still need to ord

Re: tinkering with limits while replicating

2013-02-05 Thread Nathan Vander Wilt
d be installing arbitrary CouchApps.) regards, -natevw On Feb 5, 2013, at 10:39 AM, Tibor Gemes wrote: > I've rewritten my filters into erlang and the continuous filtered > replications work faster with a few magnitude. T > 2013.02.05. 19:23, "Nathan Vander Wilt" ezt í

Re: tinkering with limits while replicating

2013-02-05 Thread Nathan Vander Wilt
Hi Stephen, I've been doing some tests related to replication lately too (continuous+filtered in my case). I suspect the reason Futon hangs is because your whole VM is running out of RAM due to your very high os_process_limit. I went in to a bit more detail in http://mail-archives.apache.org/m

"Target database out of sync. Try to increase max_dbs_open at the target's server."

2012-12-02 Thread Nathan Vander Wilt
I keep seeing this error in my logs, from a replication between two database servers: [Sat, 17 Nov 2012 18:16:21 GMT] [error] [<0.22441.709>] Error in replication `ec0cd75a82ec8f2089fae72e31b29aac+continuous+create_target` (triggered by document `replicate-to-staging`): {checkpoint_commit_failu

Re: can replicator work with cookies somehow?

2012-11-08 Thread Nathan Vander Wilt
I don't fully understand what you are trying to do, but it looks like the replicator does support providing oauth tokens: http://wiki.apache.org/couchdb/Replication#OAuth Generally, the easiest way to replicate on behalf of a user is to set it replication as an _admin, but provided an appropriat

Re: Adding fields to _user db

2012-11-08 Thread Nathan Vander Wilt
The built-in validation function prevents you from storing *other* document types in the _users database. I don't know of any problems, in practice, to storing additional fields *within* user documents. You should prefix them (or isolate them within an app-specific key) however, to avoid issues

Re: RSS/Atom feed show/list function

2012-11-08 Thread Nathan Vander Wilt
Late to the party but for the records I've got one that passes http://validator.w3.org/appc/ validation as used on http://n.exts.ch: https://github.com/natevw/Glob/blob/master/lists/posts.js#L67 https://github.com/natevw/Glob/blob/master/lib/atom.js Atom generation was derived from this file in j

Re: Right place for mustache.js

2012-10-27 Thread Nathan Vander Wilt
Hello Aliaksandr, and sorry this did not get an answer earlier. Assuming you figured it out by now, but for the archives the documentation on this is currently here: http://wiki.apache.org/couchdb/CommonJS_Modules In short, there's not a great "standard" way to do either. Both couchapp and kans

Re: Change in date handling from 1.0.x to 1.2

2012-09-19 Thread Nathan Vander Wilt
perhaps someone else could chime in with more expertise in this area. -nvw > On Wed, Sep 19, 2012 at 4:01 PM, Nathan Vander Wilt < > nate-li...@calftrail.com> wrote: > >> On Sep 18, 2012, at 9:02 PM, Daniel Myung wrote: >> >>> Is there some type of bytecod

Re: Rewrite inside of a path segment

2012-09-19 Thread Nathan Vander Wilt
On Sep 18, 2012, at 1:16 AM, Robin Berjon wrote: > The problem is that I need a rewrite that invariably accepts parameters that > don't fall at the / boundary. Typically: > > { >from: "/blog/*" > , to: "../../blog.*" > , method: "DELETE" > } > > And that doesn't work. It just inv

Re: Change in date handling from 1.0.x to 1.2

2012-09-19 Thread Nathan Vander Wilt
On Sep 18, 2012, at 9:02 PM, Daniel Myung wrote: > Is there some type of bytecode or something cached somewhere for design > docs for view functions that could possibly explain how my removal of the > _design directory could still yield the same original result? > Sorry, I don't have authoritati

Re: A new Garden

2012-09-12 Thread Nathan Vander Wilt
Neat idea. I've been working (off and on) on a number of Couchapps that might be a great fit. They're simple "Python couchapp" bundles rather than Kanso, especially since many of them were started a while ago: - photo library: https://github.com/natevw/ShutterStem - location logging: https://git

Re: dropping revision records

2012-09-06 Thread Nathan Vander Wilt
On Sep 6, 2012, at 7:18 AM, Tim Tisdall wrote: > I had a database of about 10.8gb with almost 15 million records which > was fully compacted. I had to back it up by dumping all the JSON and > then restoring it by inserting it back in. After it was done and I > compacted it the database was now

Re: Complex view generation stuck, never gets past silent crash (Raspberry Pi)

2012-09-05 Thread Nathan Vander Wilt
re than 2GB of data (from a 100MB database?!) at a time. I've generated this view on an older MacBook Air with only 2GB of RAM (with usually barely any free because Safari/etc. is a hog) and while it was slow it finished every time without issue. thanks, -natevw > On 5 Sep 2012, at 0

Re: Complex view generation stuck, never gets past silent crash (Raspberry Pi)

2012-09-05 Thread Nathan Vander Wilt
so excuse me if this is a > dumb answer... Have you tried sprinkling your views with log() functions to > figure out where the view is getting stuck? > > -- > RJ Steinert > http://rjsteinert.com > > > > On Sat, Sep 1, 2012 at 1:55 AM, Nathan Vander Wilt > wrote: > >&g

Re: Complex view generation stuck, never gets past silent crash (Raspberry Pi)

2012-09-03 Thread Nathan Vander Wilt
;heap"). Pasted the dump to https://gist.github.com/3617465 if anyone's interested. Will try to finish the view gen again overnight with some more swap and see how it goes. regards, -natevw On Sep 1, 2012, at 10:27 AM, Dave Cottlehuber wrote: > On 1 September 2012 07:55, Nathan Van

Re: Complex view generation stuck, never gets past silent crash (Raspberry Pi)

2012-09-01 Thread Nathan Vander Wilt
On Sep 1, 2012, at 10:27 AM, Dave Cottlehuber wrote: > On 1 September 2012 07:55, Nathan Vander Wilt > wrote: >> I've got CouchDB mostly working on my Raspberry Pi, simply via `apt-get >> couchdb` plus the permissions fix Jens posted about recently. >> >>

Complex view generation stuck, never gets past silent crash (Raspberry Pi)

2012-08-31 Thread Nathan Vander Wilt
I've got CouchDB mostly working on my Raspberry Pi, simply via `apt-get couchdb` plus the permissions fix Jens posted about recently. However, I can't get a particularly complex design document to finish its initial view generation. (See https://github.com/natevw/LocLog/tree/master/views especi

Re: API to list deleted docs, or deleted revs of a doc?

2012-08-31 Thread Nathan Vander Wilt
On Aug 31, 2012, at 3:35 PM, Jens Alfke wrote: > I’m writing a GUI app to browse the contents of databases, mostly for > debugging/troubleshooting purposes. It currently lists all the existing > documents, as Futon does, but I’d like to be able to show all the _deleted_ > documents too. But I c

Re: using mustache in couchapp

2012-02-15 Thread Nathan Vander Wilt
On Feb 15, 2012, at 5:01 PM, john.tiger wrote: > assuming my app.js and mustache.js are in the same attachments folder - when > I've used: > var Mustache = require('mustache'); > => require not found > > do I have to include require.js as well ? If you want to use JavaScript on the server side,

Re: Database size seems off even after compaction runs.

2011-12-26 Thread Nathan Vander Wilt
On Dec 23, 2011, at 2:56 PM, Chris Stockton wrote: > Hello, > > On Fri, Dec 23, 2011 at 5:48 AM, CGS wrote: >> Hi, >> >> Sorry to interfere with such a question, but why don't you work with a >> buffer database? I mean, make a replica to another database which filters >> out the deleted document

Rewrite not able to combine multiple path parts into single query value?

2011-12-07 Thread Nathan Vander Wilt
I'm trying to spin up a very simple blog engine in CouchDB. Each post has a "path" property like "2010/11/building_ppc_couchdb" that I'd like to use via a rewrite rule as follows: { "from": "/blog/*", "to": "_list/posts/by_path", "query": { "include_docs": "true", "key

Re: Any way to explicitly skip design docs in replication?

2011-12-01 Thread Nathan Vander Wilt
On Nov 30, 2011, at 8:04 AM, Jens Alfke wrote: > > On Nov 30, 2011, at 6:18 AM, Robert Newson wrote: > >> We could add another built-in filter to complement _design (which only >> includes design docs), _not_design (or something less silly than that >> even). Would be trivial and would avoid this

ANN: Fermata, a "native" JavaScript library for CouchDB (and everything else)

2011-08-12 Thread Nathan Vander Wilt
I was given some encouragement at CouchConf to announce my little REST library that's been working beautifully for CouchDB clients (and more): https://github.com/andyet/fermata (single

Re: Querying a view with a complex key with a wildcard

2011-03-30 Thread Nathan Vander Wilt
On Mar 29, 2011, at 8:39 PM, Mclendon, William C III wrote: > Hi, > > I've got a view that is built from a map.js that looks like this: > > function(doc) > { > if(doc['record type']=='search') >{ >emit( [doc.status, doc.time], doc ) >} > } Not related to the main discussion, but: Yo

Re: Loading CouchDB to Amazon Linux AMI

2011-02-04 Thread Nathan Vander Wilt
I compiled CouchDB on the default AMI, and I didn't need quite so many manually installed dependencies at least back then. Here's my notes for comparison: # 2010 November 27 # ### CouchDB ### # following Fedora instructions at https://github.com/couchone/build-couchdb sudo yum install git gcc gc

Re: offset in view response

2011-01-29 Thread Nathan Vander Wilt
On Jan 27, 2011, at 3:52 AM, Matt Goodall wrote: > On 27 January 2011 11:13, Stefan Lang > wrote: > >> I couldn't find a single sentence about the offset member >> of a view response in either the reference on couchone.com >> or the reference on the wiki. >> >> Only thing I could find was this:

Re: Replication hangs w/redirected URL

2010-07-24 Thread Nathan Vander Wilt
o use port 5983 as described in OP). I was able to successfully replicate just by removing my CouchApp's view document from the old instance and re-installing it from source on the new. hth, -natevw >> On Thu, 2010-07-15 at 09:05 -0700, Nathan Vander Wilt wrote: >>> Firs

Replication hangs w/redirected URL

2010-07-15 Thread Nathan Vander Wilt
First of all, congrats to all on the 1.0 release! I am having some trouble replicating a database from CouchDBX-0.11.0-R13B04-64bit-Snow-Leopard to CouchDBX-1.0.0-7-Universal, however. On the new version, the replicate request gets stuck in this loop: 1> [error] [<0.163.0>] streaming att. ended