You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Hubbell <ri...@yahoo.com> on 2008/04/28 19:00:04 UTC

[users@httpd] aptmpZbGOTJ files in apache CacheRoot

Seeing thousands of files in CacheRoot that look like
this:

aptmpZbGOTJ

This clearly seems like a bug.  Could this somehow be
a feature?  I just can't imagine what purpose it would serve.


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by Richard Hubbell <ri...@yahoo.com>.
I found a stagnant bug describing this problem.  It's
~three years old.

Thanks Matus for trying to answer the question.  I
think you misunderstood what the question was. Maybe
this is better to understand.

CacheRoot = /cache/

cd /cache

ls |grep -v aptmp|wc -l
64

The 64 represents the 0-9a-zA-Z_@ dirs created by the
cache.

ls |wc -l
42332


So why are there 42,000 files sitting in CacheRoot?
Why aren't they stored in their proper buckets?
If this is a feature then I can't work out why.






      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
On 28.04.08 10:43, Richard Hubbell wrote:
> I must be missing something regarding the cache. The
> files written into CacheRoot directory are temporary.

depends on the meaning of temporary.

> Now I see that some temp files would be expected to be
> in CacheRoot but not after the cache has been
> shutdown.

No. The contents of cache may be valid, and while it's being used, it may
not be cleaned for a long time, independently of status of apache server.

those files represent http/cache objects, they are copies of objects on the
web. If cache user fetches image from a page, and the image is often used
and does not change, there is no need to clean it, ad it would be soon
re-fetched from websever and stored again (probably on the same place)...
-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux - It's now safe to turn on your computer.
Linux - Teraz mozete pocitac bez obav zapnut.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by Richard Hubbell <ri...@yahoo.com>.
Dragon, all,

I must be missing something regarding the cache. The
files written into CacheRoot directory are temporary.
Any file in the CacheRoot directory ( and not in the
actual cache directories that are created under
CacheRoot ) should come and go while the cache is in
use.

1. request for file from cache
2. cache gets the file from origin server
3. cache temporarily writes the file into CacheRoot
4. the file very soon after gets written to its final
resting spot somewhere under CacheRoot, in a dir
5. file gets unlinked from CacheRoot

Now I see that some temp files would be expected to be
in CacheRoot but not after the cache has been
shutdown.
It should either put the file into its correct
directory in the cache or remove it from CacheRoot
dir.


Can you id where there's a gap in my understanding above?


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by Dragon <dr...@crimson-dragon.com>.
Richard Hubbell wrote:

>The server was shutdown via apachectl stop.  ~50,000
>of those files remain in CacheRoot.  Server restart
>and still those files remain.  Seems like a bug.
>Unless there's some other mechanism that's supposed to
>take them out of their "temporary" state.
---------------- End original message. ---------------------

PLEASE DON'T top post, it destroys the flow of conversation.

Again, I do not know the specifics of the cache module you are using 
but it is very likely that those files are still there because they 
are still valid cached content. If they aren't, it is likely that 
they will not get removed until they are invalidated when somebody 
tries to access the corresponding page or file that has gone out of 
date in the cache.

Just stopping and starting the server should not remove the cached 
content. What would be the point of that? If I had cached content, I 
would want whatever is still valid to survive a restart of the server.

Dragon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
Richard Hubbell wrote:
> The server was shutdown via apachectl stop.  ~50,000
> of those files remain in CacheRoot.  Server restart
> and still those files remain.  Seems like a bug.
> Unless there's some other mechanism that's supposed to
> take them out of their "temporary" state.

How temporary?  You need to look at htcacheclean for mopping these up
periodically.  You don't want mod_disk_cache constantly cleaning up
after itself or at apache shutdown, otherwise the server would be
seriously slower and at startup the cache feature would be worthless.

If this isn't desired, see mod_mem_cache.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by Richard Hubbell <ri...@yahoo.com>.
The server was shutdown via apachectl stop.  ~50,000
of those files remain in CacheRoot.  Server restart
and still those files remain.  Seems like a bug.
Unless there's some other mechanism that's supposed to
take them out of their "temporary" state.

--- Dragon <dr...@crimson-dragon.com> wrote:

> Richard Hubbell wrote:
> >Seeing thousands of files in CacheRoot that look
> like
> >this:
> >
> >aptmpZbGOTJ
> >
> >This clearly seems like a bug.  Could this somehow
> be
> >a feature?  I just can't imagine what purpose it
> would serve.
> ---------------- End original message.
> ---------------------
> 
> Why do you think this is a bug?
> 
> It looks like a temporary file name to me. I don't
> know the 
> implementation details of the particular cache
> module you are using, 
> but I would suspect that it uses unique temporary
> file names to store 
> cached content to ensure that there is a unique name
> for each cached 
> item. It really would make no sense to cache a file
> under its "real" 
> name if there are multiple files with that name in
> multiple places 
> under the document root.
> 
> An example where this would apply is a very common
> situation where 
> you would have an index.html file under every
> subdirectory in your 
> document hierarchy. By giving each cached file a
> unique name and 
> mapping the unique file name to the URI, the cache
> module will serve 
> the right one from the cached content.
> 
> 
> 
> Dragon
> 
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   Venimus, Saltavimus, Bibimus (et naribus canium
> capti sumus)
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
>
---------------------------------------------------------------------
> The official User-To-User support forum of the
> Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for
> more info.
> To unsubscribe, e-mail:
> users-unsubscribe@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
> users-help@httpd.apache.org
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] aptmpZbGOTJ files in apache CacheRoot

Posted by Dragon <dr...@crimson-dragon.com>.
Richard Hubbell wrote:
>Seeing thousands of files in CacheRoot that look like
>this:
>
>aptmpZbGOTJ
>
>This clearly seems like a bug.  Could this somehow be
>a feature?  I just can't imagine what purpose it would serve.
---------------- End original message. ---------------------

Why do you think this is a bug?

It looks like a temporary file name to me. I don't know the 
implementation details of the particular cache module you are using, 
but I would suspect that it uses unique temporary file names to store 
cached content to ensure that there is a unique name for each cached 
item. It really would make no sense to cache a file under its "real" 
name if there are multiple files with that name in multiple places 
under the document root.

An example where this would apply is a very common situation where 
you would have an index.html file under every subdirectory in your 
document hierarchy. By giving each cached file a unique name and 
mapping the unique file name to the URI, the cache module will serve 
the right one from the cached content.



Dragon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Venimus, Saltavimus, Bibimus (et naribus canium capti sumus)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org