[ 
https://issues.apache.org/jira/browse/TS-4465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15293456#comment-15293456
 ] 

Alan M. Carroll commented on TS-4465:
-------------------------------------

It could be a memory limitation. I would see what happens with a 2T cache file 
and an [average object 
size|https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#proxy-config-cache-min-average-object-size]
 of 65536. Looking at the code, "unable to clear cache directory" is only 
generated if the write of the directory to the file fails. It may be there is a 
some file system limit on the size of a write - for a 1.6TB cache the write 
could be on the order of 2GB for the default average object size. This size 
cache in the file system should be possible, I've had to deal with another bug 
where the file size was 6TB.

> Cannot use disk cache file > 1.6T
> ---------------------------------
>
>                 Key: TS-4465
>                 URL: https://issues.apache.org/jira/browse/TS-4465
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Stefan Warten
>            Assignee: Alan M. Carroll
>             Fix For: sometime
>
>
> Fresh install of ATS 6.1.2 cannot use disk cache file > 1.6T.
> /etc/trafficserver/storage.config:
> {code}
> /data/trafficserver 2400G
> {code}
> /var/log/trafficserver/diags.log:
> {code}
> [May 20 13:03:38.749] Server {0x2aee9c706700} WARNING: <CacheDisk.cc:160 
> (openStart)> disk header different for disk /data/trafficserver/cache.db: 
> clearing the disk
> [May 20 13:03:38.759] Server {0x2aee9c706700} NOTE: <Cache.cc:2823 
> (cplist_reconfigure)> Clearing Disk: /data/trafficserver/cache.db
> [May 20 13:03:38.762] Server {0x2aee9ce0d700} NOTE: <Cache.cc:1396 (init)> 
> clearing cache directory '/data/trafficserver/cache.db 319488:211025881'
> [May 20 13:03:44.810] Server {0x2aee9ce0d700} WARNING: <Cache.cc:1440 
> (handle_dir_clear)> unable to clear cache directory 
> '/data/trafficserver/cache.db 319488:211025881'
> [May 20 13:03:44.821] Server {0x2aee9ce0d700} WARNING: <Cache.cc:910 
> (cacheInitialized)> failed to initialize the cache for http: cache disabled
> [May 20 13:03:44.821] Server {0x2aee9ce0d700} NOTE: <Cache.cc:1080 
> (cacheInitialized)> cache disabled
> {code}
> I tried it with several sizes. I can create cache.db with max 1600GB. 
> Anything bigger results in the cache being disabled (log above). It actually 
> creates the file with the mentioned size, file permissions are ok but it 
> always complains that "disk header different for disk 
> /data/trafficserver/cache.db: clearing the disk" and "failed to initialize 
> the cache for http: cache disabled".
> Strange thing is that we use the same version on other servers where we 
> upgraded an installation from a previous version. cache.db file already 
> existed and this is working fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to