Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 3299 invoked from network); 2 Dec 2010 17:48:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Dec 2010 17:48:58 -0000 Received: (qmail 21206 invoked by uid 500); 2 Dec 2010 17:48:57 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 21167 invoked by uid 500); 2 Dec 2010 17:48:57 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 21159 invoked by uid 99); 2 Dec 2010 17:48:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 17:48:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of poirier@pobox.com designates 208.72.237.35 as permitted sender) Received: from [208.72.237.35] (HELO sasl.smtp.pobox.com) (208.72.237.35) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 17:48:51 +0000 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 6E1381D26 for ; Thu, 2 Dec 2010 12:48:29 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=mime-version :in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; s=sasl; bh=4PZDDghp0nW3 WlQoOZ8BunuIUNA=; b=qS+XlyoYfgJa3D5pwKFnLz2YvGwvQwQGQQQeCO3xLXWE 938cnna03oTdJs/WJWnDbEjSVwGK2hJkxSyrMWpPrviysMlcXecCYPowcZT8Zr3k b0D7s6R4vYZ487SJyAXUNcSme7dpvzuJDUVwaHYtSJx4ChMC52s04rWPD486gxc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=mime-version :in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; q=dns; s=sasl; b=bsnwSs H4j2tRV7ogYmTXywttIFOw4MQRqnh1YQKl3K7FBbBsXzQdFY/dWxhUOA62+RSlAi HEh6Wv34qgcITrW2z7WaVofub8tjKdXqMBTeAwbsPzPgZx5UuvEGXijxwsrsgmHK d3p4Ss5iHsFQE1bqXbykV2lxeFN3OEsahWbnQ= Received: from b-pb-sasl-quonix. (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 6AB671D25 for ; Thu, 2 Dec 2010 12:48:29 -0500 (EST) Received: from mail-gw0-f45.google.com (unknown [74.125.83.45]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 4239B1D24 for ; Thu, 2 Dec 2010 12:48:29 -0500 (EST) Received: by gwj23 with SMTP id 23so2483337gwj.18 for ; Thu, 02 Dec 2010 09:48:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.57.204 with SMTP id d12mr1092836bkh.174.1291312108233; Thu, 02 Dec 2010 09:48:28 -0800 (PST) Received: by 10.204.115.195 with HTTP; Thu, 2 Dec 2010 09:48:28 -0800 (PST) In-Reply-To: References: <4CEC0631.1050307@pobox.com> Date: Thu, 2 Dec 2010 12:48:28 -0500 Message-ID: Subject: Re: disk cache file rename errors on Windows From: Dan Poirier To: dev@httpd.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 5F424390-FE3C-11DF-8F19-A49B9CC1316E-25076293!b-pb-sasl-quonix.pobox.com On Thu, Dec 2, 2010 at 12:23 PM, Graham Leggett wrote: > On 23 Nov 2010, at 8:21 PM, Dan Poirier wrote: > >> We're seeing errors like this from mod_disk_cache on Windows only: >> >> (OS 5)Access is denied. =C2=A0: disk_cache: rename tempfile to datafile >> failed: c:/temp/HTTPServer7/aptmpV0JKJ8 -> >> c:/temp/HTTPServer7/wHY/FhW/b5uD@MuvttLK@V4w.data >> >> under moderate to heavy load, resulting in requests failing. > > Looking at the code, the error message is thrown when apr_file_rename() > fails, specifically when a temporary file is swung into place in the cach= e. > > Looking at the APR code, there is a forest of ifdefs that seem to choose = one > of MoveFileEx(), MoveFileW(), MoveFileExW() or MoveFile(). Ideally, the > Microsoft API documentation should explain under what conditions the erro= r > "Access is denied" is thrown. > > Does Windows allow you to move a file into place while the replaced file = is > still open for read? Disclaimer: My last real Windows programming was on WfW 3.11, so please, someone with up-to-date Windows programming experience correct me as needed. >From the doc for MoveFileEx (http://msdn.microsoft.com/en-us/library/aa365240%28VS.85%29.aspx), you can pass a flag telling Windows to do the move on the next reboot (also see http://support.microsoft.com/kb/140570) , apparently to work around an inability to rename another file over a file in use. So I think the answer to your question is "no". The doc for error 0x05 at http://msdn.microsoft.com/en-us/library/ms681382%28v=3DVS.85%29.aspx consists, in its entirety, of "Access is denied.". Maybe there's more explanation elsewhere. --=20 Dan Poirier