You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Zachary Zolton <za...@gmail.com> on 2010/01/07 20:34:17 UTC

Do I need the couchdb.stdout file?

Relaxers,

It seems the contents of my server's couch.log file and couchdb.stdout
file are fairly identical, showing all the request being made to the
server.

Given the seeming redundant data, I ask: Do I need to maintain both
these files? Or should I just add couchdb.stdout to my log rotation
and forget about it?

(I wasn't able to find any reference to this in the wiki, nor much
useful information via Google.)


Cheers,

Zach


P.S. I'm mostly interested in this since I was just bitten by a
server's disk partition getting filled up by this very file... (^_-)

Re: Do I need the couchdb.stdout file?

Posted by Zachary Zolton <za...@gmail.com>.
Oh! For some reason I didn't just copy over the default
/etc/default/couchdb script in my EC2 setup...

The default one includes this:

COUCHDB_STDOUT_FILE=/dev/null
COUCHDB_STDERR_FILE=/dev/null

Whereas my custom one sent them to /usr/local/var/log/couchdb. I'd
guess that explains why there's not more newbs tripped up like this.

On Fri, Jan 8, 2010 at 2:16 PM, Kevin Ferguson <ke...@meebo-inc.com> wrote:
> I don't think he was proposing turning off all logs, just couchdb.stdout.
>
> We turned off couchdb.stdout on our cluster because 1) it was enormous; 2)
> it did not appear to contain anything useful that's not in couch.log; and 3)
> we had trouble making it rotate correctly.  So I would totally advise
> redirecting stdout to /dev/null on a busy production setup.  stderr has been
> useful, though.
>
> Kevin
>
> On Fri, Jan 8, 2010 at 12:11 PM, Noah Slater <ns...@tumbolia.org> wrote:
>
>> The log files are useful for diagnosing problems. Keep them under
>> /var/log/couchdb which the init script takes care of. I would also recommend
>> rotating them so they don't get so big. Check the /etc/logrotate.d/couchdb
>> script which is provided with CouchDB. The README also mentions this.
>>
>> On 8 Jan 2010, at 17:58, Zachary Zolton wrote:
>>
>> > On Fri, Jan 8, 2010 at 11:30 AM, Noah Slater <ns...@tumbolia.org>
>> wrote:
>> >> Yes, but don't. Why would you do that?
>> >
>> > Sheer ignorance—I'm just trying to figure out how to improve my
>> > CouchDB configuration. (^_^)
>> >
>> > What happened was I was rotating the couch.log file, but I forgot
>> > about the stdout file, which eventually filled up my partition.
>> > (Doh...!) When I logged in found the stdout file full of request,
>> > which already seemed to be recorded by the couch.log file, so I wasn't
>> > sure if the stdout file was useful. (I know: disk space costs approach
>> > zero as time goes to infinity, so I shouldn't worry about storing
>> > stuff redundantly!)
>> >
>> > So, I guess I should be asking you about purpose of the stdout/stderr
>> > files in order to figure out the best practice.
>> >
>> > Am I still making sense? My silly thread has grow so long now... (^_-)
>>
>>
>

Re: Do I need the couchdb.stdout file?

Posted by Kevin Ferguson <ke...@meebo-inc.com>.
I don't think he was proposing turning off all logs, just couchdb.stdout.

We turned off couchdb.stdout on our cluster because 1) it was enormous; 2)
it did not appear to contain anything useful that's not in couch.log; and 3)
we had trouble making it rotate correctly.  So I would totally advise
redirecting stdout to /dev/null on a busy production setup.  stderr has been
useful, though.

Kevin

On Fri, Jan 8, 2010 at 12:11 PM, Noah Slater <ns...@tumbolia.org> wrote:

> The log files are useful for diagnosing problems. Keep them under
> /var/log/couchdb which the init script takes care of. I would also recommend
> rotating them so they don't get so big. Check the /etc/logrotate.d/couchdb
> script which is provided with CouchDB. The README also mentions this.
>
> On 8 Jan 2010, at 17:58, Zachary Zolton wrote:
>
> > On Fri, Jan 8, 2010 at 11:30 AM, Noah Slater <ns...@tumbolia.org>
> wrote:
> >> Yes, but don't. Why would you do that?
> >
> > Sheer ignorance—I'm just trying to figure out how to improve my
> > CouchDB configuration. (^_^)
> >
> > What happened was I was rotating the couch.log file, but I forgot
> > about the stdout file, which eventually filled up my partition.
> > (Doh...!) When I logged in found the stdout file full of request,
> > which already seemed to be recorded by the couch.log file, so I wasn't
> > sure if the stdout file was useful. (I know: disk space costs approach
> > zero as time goes to infinity, so I shouldn't worry about storing
> > stuff redundantly!)
> >
> > So, I guess I should be asking you about purpose of the stdout/stderr
> > files in order to figure out the best practice.
> >
> > Am I still making sense? My silly thread has grow so long now... (^_-)
>
>

Re: Do I need the couchdb.stdout file?

Posted by Noah Slater <ns...@tumbolia.org>.
The log files are useful for diagnosing problems. Keep them under /var/log/couchdb which the init script takes care of. I would also recommend rotating them so they don't get so big. Check the /etc/logrotate.d/couchdb script which is provided with CouchDB. The README also mentions this.

On 8 Jan 2010, at 17:58, Zachary Zolton wrote:

> On Fri, Jan 8, 2010 at 11:30 AM, Noah Slater <ns...@tumbolia.org> wrote:
>> Yes, but don't. Why would you do that?
> 
> Sheer ignorance—I'm just trying to figure out how to improve my
> CouchDB configuration. (^_^)
> 
> What happened was I was rotating the couch.log file, but I forgot
> about the stdout file, which eventually filled up my partition.
> (Doh...!) When I logged in found the stdout file full of request,
> which already seemed to be recorded by the couch.log file, so I wasn't
> sure if the stdout file was useful. (I know: disk space costs approach
> zero as time goes to infinity, so I shouldn't worry about storing
> stuff redundantly!)
> 
> So, I guess I should be asking you about purpose of the stdout/stderr
> files in order to figure out the best practice.
> 
> Am I still making sense? My silly thread has grow so long now... (^_-)


Re: Do I need the couchdb.stdout file?

Posted by Zachary Zolton <za...@gmail.com>.
On Fri, Jan 8, 2010 at 11:30 AM, Noah Slater <ns...@tumbolia.org> wrote:
> Yes, but don't. Why would you do that?

Sheer ignorance—I'm just trying to figure out how to improve my
CouchDB configuration. (^_^)

What happened was I was rotating the couch.log file, but I forgot
about the stdout file, which eventually filled up my partition.
(Doh...!) When I logged in found the stdout file full of request,
which already seemed to be recorded by the couch.log file, so I wasn't
sure if the stdout file was useful. (I know: disk space costs approach
zero as time goes to infinity, so I shouldn't worry about storing
stuff redundantly!)

So, I guess I should be asking you about purpose of the stdout/stderr
files in order to figure out the best practice.

Am I still making sense? My silly thread has grow so long now... (^_-)

Re: Do I need the couchdb.stdout file?

Posted by Noah Slater <ns...@tumbolia.org>.
Yes, but don't. Why would you do that?

On 8 Jan 2010, at 17:03, Zachary Zolton wrote:

> Okay, looking into my /usr/local/etc/default/couchdb file, I noticed
> it contains the following:
> 
> export COUCHDB_USER=couchdb
> export COUCHDB_STDOUT_FILE=/usr/local/var/log/couchdb/couchdb.stdout
> export COUCHDB_STDERR_FILE=/usr/local/var/log/couchdb/couchdb.stderr
> 
> So, my question is can I just set those two file paths to /dev/null
> without causing any problems?
> 
> P.S. I'm using Monit to start CouchDB with: "/etc/init.d/couchdb
> start", so it should be a standard daemon...
> 
> On Thu, Jan 7, 2010 at 8:07 PM, Noah Slater <ns...@tumbolia.org> wrote:
>> If you run CouchDB from the init script it will log to a standard log file under PREFIX/var/log, but if you run it manually from the command line, it will output to couchdb.stdout/stderr. It is up to you which you want to use, and what you do with the output in each case. I would advise using the init script where you are running it regularly as a daemon.
>> 
>> On 7 Jan 2010, at 19:47, Matt Goodall wrote:
>> 
>>> 2010/1/7 Zachary Zolton <za...@gmail.com>
>>> 
>>>> Relaxers,
>>>> 
>>>> It seems the contents of my server's couch.log file and couchdb.stdout
>>>> file are fairly identical, showing all the request being made to the
>>>> server.
>>>> 
>>>> Given the seeming redundant data, I ask: Do I need to maintain both
>>>> these files? Or should I just add couchdb.stdout to my log rotation
>>>> and forget about it?
>>>> 
>>>> (I wasn't able to find any reference to this in the wiki, nor much
>>>> useful information via Google.)
>>>> 
>>>> 
>>>> Cheers,
>>>> 
>>>> Zach
>>>> 
>>>> 
>>>> P.S. I'm mostly interested in this since I was just bitten by a
>>>> server's disk partition getting filled up by this very file... (^_-)
>>>> 
>>> 
>>> Heh, I experienced something similar the other day. I run couchdb under
>>> daemon and let daemon handle sending the couchdb output to a log file. A was
>>> surprised to discover that couchdb was logging to var/log/couchdb/couch.log
>>> too.
>>> 
>>> Perhaps couchdb log to stdout when run in the foreground or couch.log when
>>> daemonised?
>>> 
>>> - Matt
>> 
>> 


Re: Do I need the couchdb.stdout file?

Posted by Zachary Zolton <za...@gmail.com>.
Okay, looking into my /usr/local/etc/default/couchdb file, I noticed
it contains the following:

export COUCHDB_USER=couchdb
export COUCHDB_STDOUT_FILE=/usr/local/var/log/couchdb/couchdb.stdout
export COUCHDB_STDERR_FILE=/usr/local/var/log/couchdb/couchdb.stderr

So, my question is can I just set those two file paths to /dev/null
without causing any problems?

P.S. I'm using Monit to start CouchDB with: "/etc/init.d/couchdb
start", so it should be a standard daemon...

On Thu, Jan 7, 2010 at 8:07 PM, Noah Slater <ns...@tumbolia.org> wrote:
> If you run CouchDB from the init script it will log to a standard log file under PREFIX/var/log, but if you run it manually from the command line, it will output to couchdb.stdout/stderr. It is up to you which you want to use, and what you do with the output in each case. I would advise using the init script where you are running it regularly as a daemon.
>
> On 7 Jan 2010, at 19:47, Matt Goodall wrote:
>
>> 2010/1/7 Zachary Zolton <za...@gmail.com>
>>
>>> Relaxers,
>>>
>>> It seems the contents of my server's couch.log file and couchdb.stdout
>>> file are fairly identical, showing all the request being made to the
>>> server.
>>>
>>> Given the seeming redundant data, I ask: Do I need to maintain both
>>> these files? Or should I just add couchdb.stdout to my log rotation
>>> and forget about it?
>>>
>>> (I wasn't able to find any reference to this in the wiki, nor much
>>> useful information via Google.)
>>>
>>>
>>> Cheers,
>>>
>>> Zach
>>>
>>>
>>> P.S. I'm mostly interested in this since I was just bitten by a
>>> server's disk partition getting filled up by this very file... (^_-)
>>>
>>
>> Heh, I experienced something similar the other day. I run couchdb under
>> daemon and let daemon handle sending the couchdb output to a log file. A was
>> surprised to discover that couchdb was logging to var/log/couchdb/couch.log
>> too.
>>
>> Perhaps couchdb log to stdout when run in the foreground or couch.log when
>> daemonised?
>>
>> - Matt
>
>

Re: Do I need the couchdb.stdout file?

Posted by Noah Slater <ns...@tumbolia.org>.
If you run CouchDB from the init script it will log to a standard log file under PREFIX/var/log, but if you run it manually from the command line, it will output to couchdb.stdout/stderr. It is up to you which you want to use, and what you do with the output in each case. I would advise using the init script where you are running it regularly as a daemon.

On 7 Jan 2010, at 19:47, Matt Goodall wrote:

> 2010/1/7 Zachary Zolton <za...@gmail.com>
> 
>> Relaxers,
>> 
>> It seems the contents of my server's couch.log file and couchdb.stdout
>> file are fairly identical, showing all the request being made to the
>> server.
>> 
>> Given the seeming redundant data, I ask: Do I need to maintain both
>> these files? Or should I just add couchdb.stdout to my log rotation
>> and forget about it?
>> 
>> (I wasn't able to find any reference to this in the wiki, nor much
>> useful information via Google.)
>> 
>> 
>> Cheers,
>> 
>> Zach
>> 
>> 
>> P.S. I'm mostly interested in this since I was just bitten by a
>> server's disk partition getting filled up by this very file... (^_-)
>> 
> 
> Heh, I experienced something similar the other day. I run couchdb under
> daemon and let daemon handle sending the couchdb output to a log file. A was
> surprised to discover that couchdb was logging to var/log/couchdb/couch.log
> too.
> 
> Perhaps couchdb log to stdout when run in the foreground or couch.log when
> daemonised?
> 
> - Matt


Re: Do I need the couchdb.stdout file?

Posted by Matt Goodall <ma...@gmail.com>.
2010/1/7 Zachary Zolton <za...@gmail.com>

> Relaxers,
>
> It seems the contents of my server's couch.log file and couchdb.stdout
> file are fairly identical, showing all the request being made to the
> server.
>
> Given the seeming redundant data, I ask: Do I need to maintain both
> these files? Or should I just add couchdb.stdout to my log rotation
> and forget about it?
>
> (I wasn't able to find any reference to this in the wiki, nor much
> useful information via Google.)
>
>
> Cheers,
>
> Zach
>
>
> P.S. I'm mostly interested in this since I was just bitten by a
> server's disk partition getting filled up by this very file... (^_-)
>

Heh, I experienced something similar the other day. I run couchdb under
daemon and let daemon handle sending the couchdb output to a log file. A was
surprised to discover that couchdb was logging to var/log/couchdb/couch.log
too.

Perhaps couchdb log to stdout when run in the foreground or couch.log when
daemonised?

- Matt