incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonino Murador <toni.mura...@gmail.com>
Subject Strange behaviour of update_notification process
Date Mon, 02 Jul 2012 13:27:01 GMT
Hi,
I notice a behaviour of the update_notification process that I cannot
understand.
I setup CouchDB to send update notifications to an external process in my
local.d/example.ini:

[update_notification]
example = /usr/local/bin/example.py

The script example.py keeps reading lines from stdin and simply logs.
Everything seems to work fine when a normal document is
created/modified/deleted
in a db; the scripts receives the expected notification line:

{"type":"updated","db":"example_db"}

The problem arises when a DESIGN document gets modified in example_db. In
this
case the script is relaunched and I notice the following in CouchDB logs:

[Mon, 02 Jul 2012 12:03:32 GMT] [info] [<0.127.0>] 10.0.1.18 - - PUT
/example_db/_design/status 201
[Mon, 02 Jul 2012 12:03:32 GMT] [debug] [<0.96.0>] OS Process #Port<0.1894>
Input  :: {"type":"updated","db":"example_db"}
[Mon, 02 Jul 2012 12:03:32 GMT] [error] [<0.96.0>] Failed sending data:
{[{type,<<"ddoc_updated">>},
                                          {db,
                                           {<<"example_db">>,
                                            <<"_design/status">>}}]} ->
{json_encode,

{bad_term,

{<<"example_db">>,

<<"_design/status">>}}}
[Mon, 02 Jul 2012 12:03:32 GMT] [error] [<0.88.0>] Update notification
process
<0.96.0> died: normal
[Mon, 02 Jul 2012 12:03:32 GMT] [debug] [<0.127.0>] 'GET'
/_utils/document.html?example_db/_design/status {1,

1}
from "10.30.1.18"
Headers:
[{'Accept',"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
          {'Accept-Encoding',"gzip, deflate"},
          {'Accept-Language',"en-us,en;q=0.5"},
          {'Connection',"keep-alive"},
          {'Cookie',"5984_recent=example_db"},
          {'Host',"localhost:5984"},
          {'If-Modified-Since',"Fri, 29 Jun 2012 14:39:40 GMT"},
          {'Referer',"
http://localhost:5984/_utils/document.html?example_db/_design/status"},
          {'User-Agent',"Mozilla/5.0 (X11; Linux i686; rv:10.0.5)
Gecko/20100101 Firefox/10.0.5 Iceweasel/10.0.5"}]
[Mon, 02 Jul 2012 12:03:32 GMT] [error] [<0.94.0>] {error_report,<0.31.0>,
                       {<0.94.0>,supervisor_report,
                        [{supervisor,{local,couch_db_update_notifier_sup}},
                         {errorContext,child_terminated},
                         {reason,normal},
                         {offender,
                             [{pid,<0.95.0>},
                              {name,"example"},
                              {mfargs,
                                  {couch_db_update_notifier,start_link,
                                      ["/usr/local/bin/example.py"]}},
                              {restart_type,permanent},
                              {shutdown,1000},
                              {child_type,supervisor}]}]}}

Can anyone explain me what is going wrong?

I am using CouchDB 1.2.0

Thanks in advance,
Antonino

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message