Apache 2.4 mod#u缓存&x2B;mod#u cache#u disk+;modjk:304未修改,但内容长度已修改

Apache 2.4 mod#u缓存&x2B;mod#u cache#u disk+;modjk:304未修改,但内容长度已修改,apache,caching,mod-jk,apache2.4,mod-cache,Apache,Caching,Mod Jk,Apache2.4,Mod Cache,我快被mod_cache搞疯了 我当前的设置: Ubuntu上的Apache 2.4,带有: -mpm_工人 -mod_jk -模块缓存 -模块缓存磁盘 -mod_过期 -mod_deflate HTTP和HTTPS请求由modjk平衡到5个Tomcat应用服务器。 我想缓存Tomcat实例提供的媒体资产,但在mod_缓存方面遇到了麻烦 我当前的缓存配置: CacheRoot /srv/volatile/cache CacheDirLevels 3 CacheDirLen

我快被mod_cache搞疯了

我当前的设置:

Ubuntu上的Apache 2.4,带有:
-mpm_工人
-mod_jk
-模块缓存
-模块缓存磁盘
-mod_过期
-mod_deflate

HTTP和HTTPS请求由modjk平衡到5个Tomcat应用服务器。 我想缓存Tomcat实例提供的媒体资产,但在mod_缓存方面遇到了麻烦

我当前的缓存配置:

    CacheRoot /srv/volatile/cache
    CacheDirLevels 3
    CacheDirLength 2
    CacheEnable disk /medias

    # Currently active:
    CacheQuickHandler off
    CacheLock on
    CacheLockPath /tmp/mod_cache-lock
    CacheLockMaxAge 5
    CacheIgnoreHeaders Set-Cookie

    # This is another configuration i tried:
    #CacheIgnoreNoLastMod On
    #CacheIgnoreCacheControl On
    #CacheIgnoreQueryString On
    #CacheIgnoreHeaders Set-Cookie
我查阅了很多教程和指南,但没有成功

第一个请求得到Apache的良好服务,以下请求失败,出现奇怪的错误:

Recalled cached URL info header https://...
Recalled headers for URL https://...
Adding CACHE_SAVE filter for /medias...
Adding CACHE_REMOVE_URL filter for /medias...
cache: /media... responded with an uncacheable 304, retrying the request. Reason: contradiction: 304 Not Modified, but Content-Length modified
cache: Removing url https://
Deleting /srv/volatile/cache/.../.header from cache.
Deleting /srv/volatile/cache/.../.data from cache.
Deleting directory /srv/volatile/cache/.../7n from cache.
URL https://... failed the size check (0 < 1)
调用缓存的URL信息头https://...
调用URL的标题https://...
正在为/媒体添加缓存\u保存筛选器。。。
正在为/媒体添加缓存\u删除\u URL筛选器。。。
缓存:/media。。。响应为不可缓存304,正在重试请求。原因:矛盾:304未修改,但内容长度修改
缓存:删除url https://
正在从缓存中删除/srv/volatile/cache/...header。
正在从缓存中删除/srv/volatile/cache/....数据。
正在从缓存中删除目录/srv/volatile/cache/../7n。
统一资源定位地址https://... 大小检查失败(0<1)
我认为这可能是一个负载平衡问题,因为walk抛出了多个节点或类似的东西,但行为不是确定性的。使用apachebench&jmeter进行的测试表明,60-70%的请求失败,因此并非每个X请求都失败

如果设置了CacheIgnoreCacheControl On选项,则jmeter&apache bench抛出的请求没有失败,但access抛出的浏览器失败

有人知道吗

谢谢
Taulant

我认为,这包括在中,在Apache2.4.11中是固定的。

我认为,这包括在中,在Apache2.4.11中是固定的