Monthly Archives: March 2019

No space left on device: mod_hostinglimits: Failed to create shared memory segment on file

[hostinglimits:error] [pid 721956:tid 140505843804096] (28)No space left on device: mod_hostinglimits: Failed to create shared memory segment on file /var/logs/hostinglimits_shm.72195

It can be semaphores issue:
Cloudlinux kernel version: 2.6.32-673.26.1.lve1.4.15.el6.x86_64

ipcs -a
0x21019e52 145919280 root 600 78000 0
0xf8012979 325291313 root 600 78000 0
0xb0015185 648809778 root 600 78000 0
0x30015b4f 814452019 root 600 78000 0
0x47013071 983207220 root 600 78000 0
0x6901c6db 1153043765 root 600 78000 0
0x2f01e427 1323306294 root 600 78000 0
0xa8015f7b 1630965047 root 600 78000 0
0xd1017f3b 1800768824 root 600 78000 0
0x77019e6e 1960643897 root 600 78000 0
0xe901511c 2095910202 root 600 78000 0
0xd7014bdf 96374075 root 600 78000 0
0x8f014c0d 630754620 root 600 78000 0
0xa501e826 1071942973 root 600 78000 0

My advice to reboot the server, check uptime before reboot.

Primary script unknown error in php-fpm httpd rewrite

If you had something like this:
ProxyPassMatch “^/(.*\.php(/.*)?)$” “unix:/var/run/php-fpm/php.sock|fcgi://localhost/some/path” enablereuse=on

Advice is to change to SetHandler:


<Directory "/some/path">
<FilesMatch \.php$>
ProxyErrorOverride on
SetHandler "proxy:unix:/path/to/sock/php.sock|fcgi://localhost"
</FilesMatch>
</Directory>

debian 8 install php 7.1

apt-get install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
apt-get update

apt-get install php7.1
apt-get install php7.1-cli php7.1-common php7.1-curl php7.1-gd php7.1-json php7.1-mbstring php7.1-mysql php7.1-opcache php7.1-readline php7.1-xml

No space left on device: AH00023: Couldn’t create the rewrite-map mutex

No space left on device: AH00023: Couldn’t create the rewrite-map mutex
AH00020: Configuration Failed, exiting

ipcs -s | tail -n +4 | head -n -1 | tr -s ' ' | cut -d' ' -f3 | sort | uniq -c | sort -nr

123 apache
1 root

ipcs -s | tail -n +4 | head -n -1 | tr -s ' ' | cut -d' ' -f2,3 | while read -r id owner; do [[ $owner == "apache" ]] && ipcrm -s "$id"; done


service httpd start

Also you can try reboot server.

journalctl clear old logs centos 7

Leave only 3 days log records on server:
journalctl --vacuum-time=3d

Deleted archived journal /var/log/journal/97dbaa8c02f24706aae95a937e75f70c/system@d30241f66d70465d8cbe2b3992364ea0-0000000001d37cce-00057cddd384d48c.journal (120.0M).
Deleted archived journal /var/log/journal/97dbaa8c02f24706aae95a937e75f70c/system@d30241f66d70465d8cbe2b3992364ea0-0000000001d55995-00057cee2834a5a3.journal (120.0M).
Deleted archived journal /var/log/journal/97dbaa8c02f24706aae95a937e75f70c/system@d30241f66d70465d8cbe2b3992364ea0-0000000001d740d2-00057cfe270c1c83.journal (112.0M).
Deleted archived journal /var/log/journal/97dbaa8c02f24706aae95a937e75f70c/system@d30241f66d70465d8cbe2b3992364ea0-0000000001d915e8-00057d0eaa2713ee.journal (120.0M).
Deleted archived journal /var/log/journal/97dbaa8c02f24706aae95a937e75f70c/system@d30241f66d70465d8cbe2b3992364ea0-0000000001daf769-00057d1f2d5560e2.journal (112.0M).

Leave only last 100MB data on server:
journalctl --vacuum-size=100M