couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <>
Subject Re: SASL overhead (was Re: CouchDB and Hadoop_)
Date Mon, 19 Apr 2010 20:17:50 GMT
CouchDB definitely needs a bit of spring cleaning in the logging department.  If you haven't
noticed, most error messages are written *twice* in the logs, once in a very nice format by
SASL and once in a crude format by couch_log.  I believe this is because the couch_log event
handler is installed in the same event manager as the SASL error_logger, and because the second
handle_event clause in couch_log matches SASL-style error reports. So even if you turned off
the SASL error_logger I think you'd still get these messages in the log.  I've been meaning
to fix that ...

I'd prefer to keep the SASL-style logs, although I understand that we need to trim them down.
 That can be accomplished on a process-by-process basis by identifying the processes with
large internal states and truncating those states in a terminate() function just before exiting
(perhaps keeping the full state if ?LOG_DEBUG is on).  Cheers,


On Apr 19, 2010, at 4:03 PM, Randall Leeds wrote:

> I've found that replication crashes pin the cpu and can even make couch
> unresponsive because the message queues and internal state of the
> replication processes is huge SASL logging serializes it all to the log
> file.
> I don't really have a good solution to this. Maybe there should be an option
> for turning off SASL in couch which would restrict the log messages to
> explicitly logged messages from couches ?LOG_<level> functions. It seems a
> reasonable default to me that SASL is only enabled when log level is DEBUG.
> If people feel good about this I'd happily make the patch.
> On Apr 19, 2010 10:39 AM, "Adam Kocoloski" <> wrote:
> Thanks Fredrik.  I think I have a pretty good handle on what's happening and
> have replied in detail in JIRA.  Best,
> Adam
> On Apr 19, 2010, at 10:22 AM, Fredrik Widlund wrote:
>> Hi,

View raw message