Symptoms
-
There are no optimized static files on the website with the Pagespeed Insights extension installed in Plesk:
Browser DevTools (F12) -> Network tab shows normal files without changes in their names. For example, when checking website URL like this:
https://example.com/?PageSpeedFilters=debug,rewrite_images,rewrite_css,rewrite_javascript:
-
CentOS 7 with kernel version 3.10.0-*** is installed on the server:
# uname -msr
Linux 3.10.0-957.1.3.el7.x86_64 x86_64 -
On website request, the following errors appear in
/var/log/httpd/error.log
CONFIG_TEXT: [pagespeed:error] [pid 17686:tid 140535759107840] [mod_pagespeed 1.13.35.2-0 @17686] Failed to mkdir /var/cache/mod_pagespeed/ flush /jb9Xrf3F7w4hZ6Y_MmFT.outputlock: No such file or directory
[pagespeed:error] [pid 17686:tid 140535759107840] [mod_pagespeed 1.13.35.2-0 @17686] Failed to mkdir /var/cache/mod_pagespeed/ flush /rc:rname/ic_2L-ZMDIrHfcg3SV5sQCm/http://203.0.113.2/favicon.ico@x@._: No such file or directory -
On Apache restart the following
[pagespeed]
errors and warnings appear in/var/log/httpd/error.log
:CONFIG_TEXT: [pagespeed:error] [pid 4142:tid 139973393344640] [mod_pagespeed 1.13.35.2-0 @4142] Unable to create SHM segment [1]globalstatistics, mmap failed with errno=13.
[pagespeed:warn] [pid 4142:tid 139973393344640] [mod_pagespeed 1.13.35.2-0 @4142] Problem during shared memory setup; statistics functionality unavailable.CONFIG_TEXT: [pagespeed:error] [pid 4142:tid 139973393344640] [mod_pagespeed 1.13.35.2-0 @4142] Unable to create SHM segment [1]globalstatistics, mmap failed with errno=13.
-
/var/log/audit/audit.log
contains denial messages like below:CONFIG_TEXT: type=AVC msg=audit(1547191637.807:48051): avc: denied { map } for pid=26035 comm="httpd" path="/dev/zero" dev="devtmpfs" ino=1030 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:zero_device_t:s0 tclass=chr_file permissive=0
type=SYSCALL msg=audit(1547191637.807:48051): arch=c000003e syscall=9 success=no exit=-13 a0=0 a1=48000 a2=3 a3=1 items=0 ppid=1 pid=26035 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null)
Cause
CentOS 7 kernel bug #15680.
Resolution
As a workaround, until the issue is fixed permanently by CentOS team disable the SELinux on the server according to the following article:
How to enable/disable SELinux on a server
# grep denied /var/log/audit/audit.log | grep httpd | grep 'dev/zero' | head -1 | audit2allow -M httpd_dev-zero_pagespeed.pp
# semodule -i httpd_dev-zero_pagespeed.pp
Comments
0 comments
Please sign in to leave a comment.