Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 19B2B10946 for ; Wed, 31 Jul 2013 12:21:27 +0000 (UTC) Received: (qmail 1200 invoked by uid 500); 31 Jul 2013 12:21:25 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 1143 invoked by uid 500); 31 Jul 2013 12:21:25 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 1115 invoked by uid 99); 31 Jul 2013 12:21:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2013 12:21:24 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dansantner@me.com designates 17.158.232.236 as permitted sender) Received: from [17.158.232.236] (HELO nk11p03mm-asmtp001.mac.com) (17.158.232.236) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Jul 2013 12:21:20 +0000 Received: from [172.20.10.2] (mobile-166-147-100-251.mycingular.net [166.147.100.251]) by nk11p03mm-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MQS00EATVMLM1A0@nk11p03mm-asmtp001.mac.com> for user@couchdb.apache.org; Wed, 31 Jul 2013 12:20:51 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-07-31_05:2013-07-31,2013-07-31,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1305010000 definitions=main-1307310062 Content-type: text/plain; charset=windows-1252 MIME-version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: is it safe to delete the log file? From: Dan Santner In-reply-to: Date: Wed, 31 Jul 2013 07:20:46 -0500 Content-transfer-encoding: quoted-printable Message-id: References: <5C8FCA89-17DE-4C05-A54F-FD87AE9A6FB7@me.com> <596F855F-8BED-44B0-B946-E1CEDF90E424@sri.com> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1508) X-Virus-Checked: Checked by ClamAV on apache.org Thanks guys. Glad I asked! cat /dev/null did the trick. On Jul 30, 2013, at 4:17 PM, Robert Newson wrote: > couchdb won't close the file descriptor, so be sure to use > 'copytruncate' option with logrotate. >=20 > B. >=20 >=20 > On 30 July 2013 22:08, Jim Klo wrote: >> when you built/installed couchdb=85 there should be a logrotated = config file >> that was generated somewhere that you either need to link or copy = into >> /etc/logrotate.d/couchdb: >>=20 >> Here's the template file: >> = https://github.com/apache/couchdb/blob/master/etc/logrotate.d/couchdb.tpl.= in >>=20 >> you could probably just cut/paste and update the contents of this = (which is >> just the path to your couchdb log directory) straight into >> /etc/logrotate.d/... >>=20 >> also the safest way to truncate just about any log file is: >>=20 >> sudo cat /dev/null > /path/to/your/logfile.log >>=20 >> As it doesn't confuse any existing open file handles usually=85 >>=20 >> This is all assuming you are running on some Linux variant. >>=20 >>=20 >> - JK >>=20 >> Jim Klo >> Senior Software Engineer >> Center for Software Engineering >> SRI International >> t. @nsomnac >>=20 >> On Jul 30, 2013, at 1:51 PM, Dan Santner >> wrote: >>=20 >> I know that sounds silly but....I've done that kind of thing before = and >> really regretted it afterwards. So I'm asking you all. Can I simply = whack >> the couch.log file and trust that couch will handle that gracefully? >>=20 >> I've been using the same couchdb process for over a year now (maybe >> restarted it like 4 times) locally and noticed my log file is over = 2G! >>=20 >> Thanks, >> Dan. >>=20 >>=20