From nobody Mon Jul 17 12:19:12 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R4LlB0ZGMz4mtp1 for ; Mon, 17 Jul 2023 12:20:38 +0000 (UTC) (envelope-from freebsd-database@pp.dyndns.biz) Received: from keymaster.home (ns1.xn--wesstrm-f1a.se [81.4.102.176]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "keymaster.home", Issuer "keymaster.home" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R4Ll91VZFz3rvr for ; Mon, 17 Jul 2023 12:20:37 +0000 (UTC) (envelope-from freebsd-database@pp.dyndns.biz) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of freebsd-database@pp.dyndns.biz has no SPF policy when checking 81.4.102.176) smtp.mailfrom=freebsd-database@pp.dyndns.biz; dmarc=none Received: from [192.168.254.0] ([192.168.254.0]) by keymaster.home (8.17.1/8.17.1) with ESMTP id 36HCJCc1004402 for ; Mon, 17 Jul 2023 14:19:13 +0200 (CEST) (envelope-from freebsd-database@pp.dyndns.biz) Message-ID: <334c1023-8283-2c41-f284-ccc44bae6d0a@pp.dyndns.biz> Date: Mon, 17 Jul 2023 14:19:12 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Apache log rotation To: questions@freebsd.org References: Content-Language: en-GB From: =?UTF-8?Q?Morgan_Wesstr=c3=b6m?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [0.03 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; AUTH_NA(1.00)[]; HFILTER_HELO_IP_A(1.00)[keymaster.home]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_MIXED_CHARSET(0.83)[subject]; HFILTER_HELO_NORES_A_OR_MX(0.30)[keymaster.home]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; ASN(0.00)[asn:198203, ipnet:81.4.100.0/22, country:NL]; R_SPF_NA(0.00)[no SPF record]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[pp.dyndns.biz]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; BLOCKLISTDE_FAIL(0.00)[81.4.102.176:server fail]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4R4Ll91VZFz3rvr X-Spamd-Bar: / X-ThisMailContainsUnwantedMimeParts: N On 2023-07-16 21:07, Robert Fitzpatrick wrote: > Ever since I upgraded from FreeBSD 13.1 to 13.2, each week when the logrotate > happens for my Apache logs, apache dies. I see this in the log... > I don't have an answer for your specific problem but just wanted to suggest an alternative solution. Have you looked at sysutils/cronolog? Instead of relying on logrotate and restarting the apache process you simply pipe the logs to cronolog which splits them according to a pattern you define. Apache will run uninterrupted and logrotate won't be used at all. Snippets from my own conf files that splits the logfiles per year-month (note the pipe sign): ErrorLog "|/usr/local/sbin/cronolog /var/log/apache24/httpd-error.%Y%m.default.log" CustomLog "|/usr/local/sbin/cronolog /var/log/apache24/httpd-access.%Y%m.default.log" combinedio Regards Morgan