You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2014/09/26 18:54:56 UTC

[Bug 57023] New: Socache shmcb don't cache file bigger than 11k

https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

            Bug ID: 57023
           Summary: Socache shmcb don't cache file bigger than 11k
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_socache_(dbm|dc|memcache|shmcb)
          Assignee: bugs@httpd.apache.org
          Reporter: jeromep3000@gmail.com

Hello,

I'm trying to use mod_socache_shmcb but it generates error when adding file
bigger than 11k.

[Fri Sep 26 18:38:57.777274 2014] [cache:debug] [pid 2998] mod_cache.c(210):
[client 10.11.12.20:57770] AH00750: Adding CACHE_SAVE filter for /logo_ig.png,
referer: http://10.11.12.13/
[Fri Sep 26 18:38:57.777315 2014] [cache:debug] [pid 2998] mod_cache.c(220):
[client 10.11.12.20:57770] AH00751: Adding CACHE_REMOVE_URL filter for
/logo_ig.png, referer: http://10.11.12.13/
[Fri Sep 26 18:38:57.777764 2014] [cache:debug] [pid 2998]
cache_storage.c(664): [client 10.11.12.20:57770] AH00698: cache: Key for entity
/logo_ig.png?(null) is http://jpa.com:80/logo_ig.png?, referer:
http://10.11.12.13/
[Fri Sep 26 18:38:57.777782 2014] [cache:debug] [pid 2998] mod_cache.c(1330):
[client 10.11.12.20:57770] AH00769: cache: Caching url: /logo_ig.png, referer:
http://10.11.12.13/
[Fri Sep 26 18:38:57.777786 2014] [cache:debug] [pid 2998] mod_cache.c(1336):
[client 10.11.12.20:57770] AH00770: cache: Removing CACHE_REMOVE_URL filter.,
referer: http://10.11.12.13/
[Fri Sep 26 18:38:57.795933 2014] [socache_shmcb:debug] [pid 2998]
mod_socache_shmcb.c(490): AH00831: socache_shmcb_store (0x68 -> subcache 8)
[Fri Sep 26 18:38:57.796175 2014] [socache_shmcb:error] [pid 2998] AH00844:
inserting socache entry larger (12379) than subcache data area (12280)
[Fri Sep 26 18:38:57.796210 2014] [socache_shmcb:error] [pid 2998] AH00833:
can't store an socache entry!
[Fri Sep 26 18:38:57.796243 2014] [cache_socache:warn] [pid 2998] (28)No space
left on device: [client 10.11.12.20:57770] AH02386: could not write to cache,
ignoring: http://jpa.com:80/logo_ig_fr.png?, referer: http://10.11.12.13/
[Fri Sep 26 18:38:57.796326 2014] [socache_shmcb:debug] [pid 2998]
mod_socache_shmcb.c(552): AH00837: socache_shmcb_remove (0x68 -> subcache 8)
[Fri Sep 26 18:38:57.796368 2014] [socache_shmcb:debug] [pid 2998]
mod_socache_shmcb.c(566): AH00839: leaving socache_shmcb_remove successfully

The message "(28)No space left on device" is strange because I have plenty of
space left.

Config is as follow:

<IfModule mod_cache.c>
        CacheMaxExpire 86400
        <IfModule mod_cache_socache.c>
                CacheSocache shmcb
                CacheSocacheMaxSize 1000000
                CacheEnable socache /
        </IfModule>
</IfModule>


Another strange thing, there is no "Shared Memory Segments" used when with
'ipcs -a' (even as root), so impossible to know where shmcb stores the cache.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57023] Socache shmcb don't cache file bigger than 11k

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

--- Comment #6 from John Jerome <je...@gmail.com> ---
(In reply to Christophe JAILLET from comment #5)
> Hi,
> 
> could you try http://svn.apache.org/r1629508
> This increase the average size of "small object".
> 
> With this patch, subcache_data_size goes from 12280 to 64768.

Thank you for your help Christophe, but unfortunately I won't be able to test
the patch right now (maybe in a few weeks).

I managed to increase the subcache_data_size with the info given by Jan :
CacheSocache shmcb:/path/to/datafile(2048000) 


My problem now is with the fall back configuration because it seems that the
CacheEnable directive is exclusive.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57023] Socache shmcb don't cache file bigger than 11k

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

--- Comment #2 from John Jerome <je...@gmail.com> ---
Ok thank you.

Do you know how 'subcache_data_size' is calculated ?

And do you know if each subcache can contain more than one entity ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57023] Socache shmcb don't cache file bigger than 11k

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

--- Comment #4 from Christophe JAILLET <ch...@wanadoo.fr> ---
(In reply to John Jerome from comment #2)
> Ok thank you.
> 
> Do you know how 'subcache_data_size' is calculated ?
> 

See
http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_socache_shmcb.c?revision=1595426&view=markup#l338

You can also set loglevel to debug in order to get information logged (see link
above at line 444)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57023] Socache shmcb don't cache file bigger than 11k

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

--- Comment #3 from John Jerome <je...@gmail.com> ---
I've tried the fall back configuration below :


        CacheMaxExpire 86400

        CacheRoot /var/tests/kache/apache_2.4/cache/

        CacheSocache shmcb
        CacheSocacheMaxSize 1000000

        CacheQuickHandler off

        CacheDirLevels 3
        CacheDirLength 1
        CacheMinFileSize 1

        <Location />
                CacheEnable socache
                CacheEnable disk
        </Location>


But when I have this message : AH00844: inserting socache entry larger (13945)
than subcache data area (12280) , I supposed that the cache on disk will be
used but it isn't.



[Fri Oct 03 12:43:22.670949 2014] [authz_core:debug] [pid 5048]
mod_authz_core.c(828): [client 10.151.27.181:21064] AH01628: authorization
result: granted (no directives), referer: http://jpa.com/env.html
[Fri Oct 03 12:43:22.671010 2014] [cache:debug] [pid 5048] mod_cache.c(502):
[client 10.151.27.181:21064] AH00757: Adding CACHE_SAVE filter for
/style/css/manual-print.css, referer: http://jpa.com/env.html
[Fri Oct 03 12:43:22.671026 2014] [cache:debug] [pid 5048] mod_cache.c(536):
[client 10.151.27.181:21064] AH00759: Adding CACHE_REMOVE_URL filter for
/style/css/manual-print.css, referer: http://jpa.com/env.html
[Fri Oct 03 12:43:22.671129 2014] [cache:debug] [pid 5048]
cache_storage.c(664): [client 10.151.27.181:21064] AH00698: cache: Key for
entity /style/css/manual-print.css?(null) is
http://jpa.com:80/style/css/manual-print.css?, referer: http://jpa.com/env.html
[Fri Oct 03 12:43:22.671156 2014] [cache:debug] [pid 5048] mod_cache.c(1330):
[client 10.151.27.181:21064] AH00769: cache: Caching url:
/style/css/manual-print.css, referer: http://jpa.com/env.html
[Fri Oct 03 12:43:22.671164 2014] [cache:debug] [pid 5048] mod_cache.c(1336):
[client 10.151.27.181:21064] AH00770: cache: Removing CACHE_REMOVE_URL filter.,
referer: http://jpa.com/env.html
[Fri Oct 03 12:43:22.671544 2014] [socache_shmcb:debug] [pid 5048]
mod_socache_shmcb.c(490): AH00831: socache_shmcb_store (0x68 -> subcache 8)
[Fri Oct 03 12:43:22.671558 2014] [socache_shmcb:error] [pid 5048] AH00844:
inserting socache entry larger (13945) than subcache data area (12280)
[Fri Oct 03 12:43:22.671564 2014] [socache_shmcb:error] [pid 5048] AH00833:
can't store an socache entry!
[Fri Oct 03 12:43:22.671573 2014] [cache_socache:warn] [pid 5048] (28)No space
left on device: [client 10.151.27.181:21064] AH02386: could not write to cache,
ignoring: http://jpa.com:80/style/css/manual-print.css?, referer:
http://jpa.com/env.html
[Fri Oct 03 12:43:22.671620 2014] [socache_shmcb:debug] [pid 5048]
mod_socache_shmcb.c(552): AH00837: socache_shmcb_remove (0x68 -> subcache 8)
[Fri Oct 03 12:43:22.671628 2014] [socache_shmcb:debug] [pid 5048]
mod_socache_shmcb.c(566): AH00839: leaving socache_shmcb_remove successfully



And when I use "CacheEnable disk" alone, the cache on disk works :


[Fri Oct 03 12:57:24.958615 2014] [cache_disk:debug] [pid 5113]
mod_cache_disk.c(1350): [client 10.151.27.181:21211] AH00737: commit_entity:
Headers and body for URL http://jpa.com:80/style/css/manual-print.css? cached.,
referer: http://jpa.com/env.html



Am I doing it wrong or is the fall back configuration not possible ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57023] Socache shmcb don't cache file bigger than 11k

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

jkaluza@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jkaluza@redhat.com

--- Comment #1 from jkaluza@redhat.com ---
Try to set CacheSocache like this:

CacheSocache shmcb:/path/to/datafile(2048000) 

The number in braces in size of the cache in bytes.

Note that according to documentation, you should also be able to cache the
files which are too big for shared memory cache into disk cache:

httpd.apache.org/docs/2.4/en/mod/mod_cache_socache.html

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 57023] Socache shmcb don't cache file bigger than 11k

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57023

--- Comment #5 from Christophe JAILLET <ch...@wanadoo.fr> ---
Hi,

could you try http://svn.apache.org/r1629508
This increase the average size of "small object".

With this patch, subcache_data_size goes from 12280 to 64768.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org