You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Christian Carter <cd...@gmail.com> on 2011/06/29 19:06:08 UTC

Badarg error in HTTP request for List Function

Hey Everyone,

I'm getting a very weird error when running one of my list functions,
leading me to believe the query server is crashing, but I don't know for
sure.  Log and function located at http://pastie.org/2138189.  The database
can be cloned from cdcarter.iriscouch.com/illi, as well.  The crash
consistently happens after those 6 keys get logged, and well, I'm stumped.
 Any ideas?

Thanks!
Christian Carter

Re: Badarg error in HTTP request for List Function

Posted by Christian Carter <cd...@gmail.com>.
On Wed, Jun 29, 2011 at 12:06 PM, Christian Carter <cd...@gmail.com>wrote:

> Hey Everyone,
>
> I'm getting a very weird error when running one of my list functions,
> leading me to believe the query server is crashing, but I don't know for
> sure.  Log and function located at http://pastie.org/2138189.  The
> database can be cloned from cdcarter.iriscouch.com/illi, as well.  The
> crash consistently happens after those 6 keys get logged, and well, I'm
> stumped.  Any ideas?
>
> Thanks!
> Christian Carter
>

Welp, everyone, I fixed it, with some help from maxogden in the IRC.  By
inspecting the compiled CS, it seems that due to the unlikely combination of
everything that I was using, coffeescript assumed I wanted the results of my
switch/case statement, which also being the last expression at the top
level, was returned.  send() returns null, so CS collected all those nulls
and returned them at the end of the list, and erlang did not like it.

Thanks for all your help and thoughts!

Christian Carter
612.327.5292

Re: Badarg error in HTTP request for List Function

Posted by Christian Carter <cd...@gmail.com>.
On Wed, Jun 29, 2011 at 5:56 PM, Dave Cottlehuber <da...@muse.net.nz> wrote:

> On 30 June 2011 05:06, Christian Carter <cd...@gmail.com> wrote:
> > Hey Everyone,
> >
> > I'm getting a very weird error when running one of my list functions,
> > leading me to believe the query server is crashing, but I don't know for
> > sure.  Log and function located at http://pastie.org/2138189.  The
> database
> > can be cloned from cdcarter.iriscouch.com/illi, as well.  The crash
> > consistently happens after those 6 keys get logged, and well, I'm
> stumped.
> >  Any ideas?
> >
> > Thanks!
> > Christian Carter
> >
>
> Hi Christian,
>
> If you set debug mode on (and turn admin party off) you can see your
> couchdb logs remotely like this:
>
> curl http://user:passwd@cdcarter.iriscouch.com/_log
>
> It looks like your MR is written in coffeescript? As far as I can see,
> CouchDB isn't aware of this yet at least on iriscouch; if it was I'd
> expect to see a coffee test suite (missing) and config query servers
> updated (missing) based on this patch from janl
>
> https://github.com/janl/couchdb/commit/7ca8251cd63f2b0ab73dc7fcad0248f97519fd25
>
> A+
> Dave
>

Dave,

I'm running the app locally, with CouchBase 2.0 (which supports
coffeescript).  I just threw it on Iris if anyone wanted to try and clone it
to debug.

I was able to find a dumb bug in my _list function (was doing && instead of
|| to see if the player was the same or different), and now it is managing
to generate the entire list (and rendering it) before outputting the
Badarg/list to binary error.  Here are the relevant logs (log_level: debug)
http://pastie.org/2143040.

Though it is no longer a show (or list) stopper, it's still a weird error
that I'd like to know what's wrong with. And why it was an error the first
time around!

Thanks,

Christian Carter
612.327.5292

Re: Badarg error in HTTP request for List Function

Posted by Dave Cottlehuber <da...@muse.net.nz>.
On 30 June 2011 05:06, Christian Carter <cd...@gmail.com> wrote:
> Hey Everyone,
>
> I'm getting a very weird error when running one of my list functions,
> leading me to believe the query server is crashing, but I don't know for
> sure.  Log and function located at http://pastie.org/2138189.  The database
> can be cloned from cdcarter.iriscouch.com/illi, as well.  The crash
> consistently happens after those 6 keys get logged, and well, I'm stumped.
>  Any ideas?
>
> Thanks!
> Christian Carter
>

Hi Christian,

If you set debug mode on (and turn admin party off) you can see your
couchdb logs remotely like this:

curl http://user:passwd@cdcarter.iriscouch.com/_log

It looks like your MR is written in coffeescript? As far as I can see,
CouchDB isn't aware of this yet at least on iriscouch; if it was I'd
expect to see a coffee test suite (missing) and config query servers
updated (missing) based on this patch from janl
https://github.com/janl/couchdb/commit/7ca8251cd63f2b0ab73dc7fcad0248f97519fd25

A+
Dave

Re: Badarg error in HTTP request for List Function

Posted by Christian Carter <cd...@gmail.com>.
The view result is here:
http://pastie.org/2140812
and the
Christian Carter
612.327.5292


On Wed, Jun 29, 2011 at 12:28 PM, Jan Lehnardt <ja...@apache.org> wrote:

>
> On 29 Jun 2011, at 19:06, Christian Carter wrote:
>
> > Hey Everyone,
> >
> > I'm getting a very weird error when running one of my list functions,
> > leading me to believe the query server is crashing, but I don't know for
> > sure.  Log and function located at http://pastie.org/2138189.  The
> database
> > can be cloned from cdcarter.iriscouch.com/illi, as well.  The crash
> > consistently happens after those 6 keys get logged, and well, I'm
> stumped.
> > Any ideas?
>
> Can you show the view result and individual documents?
>
> Cheers
> Jan
> --
>
> The view result is here:
http://pastie.org/2140812
and the docs are http://pastie.org/2140823.

Thanks so much for looking!

Re: Badarg error in HTTP request for List Function

Posted by Jan Lehnardt <ja...@apache.org>.
On 29 Jun 2011, at 19:06, Christian Carter wrote:

> Hey Everyone,
> 
> I'm getting a very weird error when running one of my list functions,
> leading me to believe the query server is crashing, but I don't know for
> sure.  Log and function located at http://pastie.org/2138189.  The database
> can be cloned from cdcarter.iriscouch.com/illi, as well.  The crash
> consistently happens after those 6 keys get logged, and well, I'm stumped.
> Any ideas?

Can you show the view result and individual documents?

Cheers
Jan
--