Issues with mod_pagespeed and PHP Sites

In the last days, weeks i recognized a raising storage usage of several Sites.
Which is not normal for these sites in this amount or short time range.

So i´ve checked what uses so much storage at these sites.

Each time it is “mod_pagespeed” under /var/cache.

In these folders there are PHP files stored, always the same, but each time with different query strings:

for example:

-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1205,26referer=displayimage.php,3Falbum=2,26pid=1205,'
-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1203,26referer=displayimage.php,3Falbum=2,26pid=1203,'
-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1206,26referer=displayimage.php,3Falbum=2,26pid=1206,'
-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1209,26referer=displayimage.php,3Falbum=2,26pid=1209,'
-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1207,26referer=displayimage.php,3Falbum=2,26pid=1207,'
-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1208,26referer=displayimage.php,3Falbum=2,26pid=1208,'
-rw-------   1 apache admin8  173 Nov  3 16:34 'addfav.php,3Fpid=1210,26referer=displayimage.php,3Falbum=2,26pid=1210,'
-rw-------   1 apache admin8  173 Nov  3 16:35 'addfav.php,3Fpid=1217,26referer=displayimage.php,3Falbum=2,26pid=1217,'
-rw-------   1 apache admin8  173 Nov  3 16:35 'addfav.php,3Fpid=1213,26referer=displayimage.php,3Falbum=2,26pid=1213,'

or

-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=7a116708d87b8546b6dc5970ef66e794,'
-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=ff6816ccc18fa0caa65f8889c9a525a0,'
-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=4c1f3f7113e9610afdc2f14c10ae30b8,'
-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=a5b9941c6567ecef7a59b963c27868ed,'
-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=9222283a984ba6517bed89feebace6fe,'
-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=875d32f1332e90dccc417017b795d431,'
-rw------- 1 apache admin12  73K Nov  3 16:46 'style.php,3Fid=1,26lang=de,26sid=cb59cf1b4e55c1f2740d4fd1b2a6a163,'

in the first case it is each time the addfav.php is requested with different Picture IDs.
In the second case, each time a different session id is used.

This fills up the available Storage very fast, and results in “DOS” because the sItes reach their quota limit.

My Apache Scope settings are:

cpcmd scope:get apache.cachetype
explicit

cpcmd scope:get apache.cache
memory

I´m confused when apache.cache is set as “memory” why are there so many Files stored to disk?
Also i tried to disable apache.cache via

cpcmd scope:set apache.cache false
and run then an htrebuild and restart the Webserver.

But i didn´t recognized any changes. The Cache is still filled up with the same files and different Session IDs.

So it seems to me that this change has no effekt.

Maybe i missed something?!?
But the current mod_pagespeed default behavior doesn´t work for me.

You’re looking at two levels of caching. /var/cache/mod_pagespeed is a separate cache used by mod_pagespeed to optimize HTML delivery. /var/cache/httpd/cache-root is the cache for static files.

Apache would use a shm to store files when apache.cache reports “memory”. This is a separate cache from the one described above.

Disable mod_pagespeed for the site to disable HTML rewriting. You can do this under Web > Site Optimizer in the control panel.

Hi Matt,

thanks for the quick response.

So in conclusion i´ve missed that apache.cache doesn´t trigger the mod_pagespeed.
It triggers only the Apache internal caching.

Good to know :wink:

Is there a scope for mod_pagespeed?
In my understanding it is enabled by default?
Or do i miss something again?

kind regards