cache_disk:error AH00708: Cannot open .data file, possible race condition

[email protected] (Unknown) Mon, 27 Apr 2026 17:18:09 +0000
Newsgroups gmane.comp.apache.user
Message-ID <MN2PR09MB60106941AE0F1CAAB3C53EEED3362@MN2PR09MB6010.namprd09.prod.outlook.com>
From: "Llewellyn, Grace (US 342C) via users" <[email protected]>
Reply-To: <[email protected]>
Cc: "Llewellyn, Grace (US 342C)" <[email protected]>

--_000_MN2PR09MB60106941AE0F1CAAB3C53EEED3362MN2PR09MB6010namp_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hi all, this is the error we have been seeing in our apache HTTP logs:

[cache_disk:error] [pid 421298:tid 421362] (2)No such file or directory: [c=
lient [REDACTED_IP]] AH00708: Cannot open data file /tmp/apache/[HASH_PATH]=
/AA.data, referer: https://[REFERER_URL]

When I check the cache, that file already exists and was created about the =
same time the error message was triggered. I believe the problem could be a=
 race condition by .header being created before .data can be read from a sl=
ightly earlier request, but I can=92t prove this based on the file creation=
 times which are rewritten after this error message is triggered and the ca=
che is rewritten. I have been unable to recreate this problem even by trigg=
ering a request with an extremely large .data file that takes longer than [=
mod_cache: CacheLockMaxAge] to write

I have ruled out the problem being that our cache is full and files can=92t=
 be written or htcacheclean being the problem by starting with a clean cach=
e that begins to get these errors before it reaches its max size. I verifie=
d that I am getting multiple consecutive requests when I see this error

Some information about our configuration:

  *   cache.conf has CacheLock on

  *   This only happens on our production environment which gets millions o=
f daily requests

  *   I do not see any other relevant errors when I turn debug mode on

  *   This is an infrequent error message, but it is reoccurring

  *   We are using an overlay file system in a Docker container

Has anyone encountered this issue before? I have not found an apache HTTP s=
etting to lock reading the cache, only writing the cache


Thank you,

Grace




--_000_MN2PR09MB60106941AE0F1CAAB3C53EEED3362MN2PR09MB6010namp_
Content-Type: text/html; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DWindows-1=
252">
</head>
<body>
<p style=3D"direction: ltr; text-align: left; text-indent: 0px; text-transf=
orm: none;">
<span style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size:=
 12pt; color: rgb(0, 0, 0);">Hi all, this is the error we have been seeing =
in our apache HTTP logs:</span></p>
<pre><div class=3D"code-block--start" contenteditable=3D"false" dir=3D"ltr"=
 style=3D"color: inherit; background-color: inherit;"></div><div style=3D"b=
ox-sizing: content-box; flex-shrink: 0; font-size: 0.875rem; padding: 8px; =
width: 2rem; color: inherit; background-color: inherit;" contenteditable=3D=
"false" dir=3D"ltr"><div class=3D"code-block-gutter-pseudo-element" data-la=
bel=3D"1" style=3D"font-family: &quot;Atlassian Mono&quot;, ui-monospace, M=
enlo, &quot;Segoe UI Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; text-a=
lign: right; white-space: pre-wrap;"></div></div><div class=3D"code-content=
" style=3D"text-align: left; text-indent: 0px; text-transform: none; font-s=
ize: 12pt; color: rgb(0, 0, 0);"><code>[cache_disk:error] [pid 421298:tid 4=
21362] (2)No such file or directory: [client [REDACTED_IP]] AH00708: Cannot=
 open data file /tmp/apache/[HASH_PATH]/AA.data, referer: https://[REFERER_=
URL]</code></div><div class=3D"code-block--end" contenteditable=3D"false" d=
ir=3D"ltr" style=3D"color: inherit; background-color: inherit;"></div></pre=
>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">When I check the cache, that file already exists a=
nd was created about the same time the
 error message was triggered. I believe the problem could be a race conditi=
on by .header being created before .data can be read from a slightly earlie=
r request, but I can=92t prove this based on the file creation times which =
are rewritten after this error message
 is triggered and the cache is rewritten. I have been unable to recreate th=
is problem even by triggering a request with an extremely large .data file =
that takes longer than [mod_cache: CacheLockMaxAge] to write&nbsp;</span></=
p>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">I have ruled out the problem being that our cache =
is full and files can=92t be written or
 htcacheclean being the problem by starting with a clean cache that begins =
to get these errors before it reaches its max size. I verified that I am ge=
tting multiple consecutive requests when I see this error</span></p>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">Some information about our configuration:&nbsp;</s=
pan></p>
<ul data-prosemirror-content-type=3D"node" data-prosemirror-node-name=3D"bu=
lletList" data-prosemirror-node-block=3D"true" style=3D"text-align: left;">
<li style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 1=
2pt; color: rgb(0, 0, 0);">
<p role=3D"presentation"><span style=3D"text-transform: none;">cache.conf h=
as&nbsp;CacheLock on</span></p>
</li><li style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-si=
ze: 12pt; color: rgb(0, 0, 0);">
<p role=3D"presentation"><span style=3D"text-transform: none;">This only ha=
ppens on our production environment which gets millions of daily requests</=
span></p>
</li><li style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-si=
ze: 12pt; color: rgb(0, 0, 0);">
<p role=3D"presentation"><span style=3D"text-transform: none;">I do not see=
 any other relevant errors when I turn debug mode on&nbsp;</span></p>
</li><li style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-si=
ze: 12pt; color: rgb(0, 0, 0);">
<p role=3D"presentation"><span style=3D"text-transform: none;">This is an i=
nfrequent error message, but it is reoccurring&nbsp;</span></p>
</li><li style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-si=
ze: 12pt; color: rgb(0, 0, 0);">
<p role=3D"presentation"><span style=3D"text-transform: none;">We are using=
 an overlay file system in a Docker container&nbsp;</span></p>
</li></ul>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">Has anyone encountered this issue before? I have n=
ot found an apache HTTP setting to lock
 reading the cache, only writing the cache&nbsp;</span></p>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);"><br>
</span></p>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">Thank you,</span></p>
<p style=3D"text-align: left; text-indent: 0px; text-transform: none;"><spa=
n style=3D"font-family: Aptos, Arial, Helvetica, sans-serif; font-size: 12p=
t; color: rgb(0, 0, 0);">Grace&nbsp;</span></p>
<div style=3D"direction: ltr; font-family: Aptos, Arial, Helvetica, sans-se=
rif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id=3D"ms-outlook-mobile-signature" style=3D"color: inherit; background=
-color: inherit;">
<table class=3D"MsoNormalTable" id=3D"table_0" cellspacing=3D"0" cellpaddin=
g=3D"0" style=3D"width: 467.25pt; box-sizing: border-box; border-collapse: =
collapse; border-spacing: 0px;">
<tbody>
<tr>
<td class=3D"MsoNormalTable" style=3D"border-width: medium 1pt medium mediu=
m; border-style: none solid none none; border-color: currentcolor windowtex=
t currentcolor currentcolor; padding: 0in 5.4pt 0in 0.2in; width: 107.6pt; =
height: 53px; box-sizing: border-box;">
<div class=3D"MsoNormalTable" style=3D"font-family: Aptos, Arial, Helvetica=
, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
</td>
<td class=3D"MsoNormalTable" style=3D"padding: 0in 5.4pt 0in 0.2in; vertica=
l-align: top; width: 359.9pt; height: 53px; box-sizing: border-box;">
</td>
</tr>
</tbody>
</table>
<div class=3D"MsoNormal" style=3D"margin: 0in; font-family: Calibri, sans-s=
erif; font-size: 11pt;">
&nbsp;</div>
</div>
</body>
</html>

--_000_MN2PR09MB60106941AE0F1CAAB3C53EEED3362MN2PR09MB6010namp_--