No space left on device: AH00023: Couldn't create the proxy mutex

Apache tiba tiba down dan sering terjadi dengan menampilkan pesan :

[Sat Apr 29 14:48:25.334267 2017] [core:emerg] [pid 93298:tid 140132036216800] (28)No space left on device: AH00023: Couldn't create the proxy mutex
[Sat Apr 29 14:48:25.334281 2017] [proxy:crit] [pid 93298:tid 140132036216800] (28)No space left on device: AH02478: failed to create proxy mutex
AH00016: Configuration Failed


Cara mengatasi :

# ipcs -s

bila menampilkan semaphore artinya apache masih belum bersih dan dapat dibersihakan memberikan perintah berikut:

ipcs | grep nobody | awk '{print $2}' > sem.txt for i in `cat sem.txt`; do { ipcrm -s $i; }; done;
atau

# for i in `ipcs -s | awk '/httpd/ {print $2}'`; do (ipcrm -s $i); done

kemudian tambahkan baris perintah dibawah di /etc/sysctl.conf

kernel.msgmni = 1024 kernel.sem = 250 256000 32 1024

bila apache masih belum bisa aktip ganti dengan :

kernel.sem = 500 64000 64 1024


tarakhir aktipkan dengan perintah:

# sysctl -p



CARA LAIN:

bikin file misalnya ipcs_check

#!/bin/sh
# vi ipcs_check
# ln -s ipcs_check  /etc/cron.hourly/

EMAIL=info@plasahosting.com
MAX_SEMAPHORES=15
USER_APACHE=nobody

IPCS=/usr/bin/ipcs
IPCRM=/usr/bin/ipcrm
MAIL=/bin/mail

COUNT=`${IPCS} | grep $USER_APACHE | wc -l`

if [ "$COUNT" -le $MAX_SEMAPHORES ]; then
       #all is well, there are no semaphore build-ups.
       exit 0;
fi

#we have more than MAX_SEMAPHORES, so clear them out and restart Apache.

LIST=/root/sem.txt

${IPCS} | grep $USER_APACHE | awk '{print $2}' > ${LIST}
for i in `cat ${LIST}`; do
{
       ${IPCRM} -s $i;
};
done;

/etc/init.d/httpd restart

TXT="${COUNT} semaphores cleared for apache for `hostname`"
echo "${TXT}" | ${MAIL} -s "${TXT}" ${EMAIL}

exit 1;


berikan mode 755

chmod 755 ipcs_check

aktipkan ke cron hours


ln -s ipcs_check /etc/cron.hourly/

Comments

Popular posts from this blog

Cara Upload file dengan Software FTP ke server hosting

Open Port zerotier di Centos Firewall

Cara mengaktipkan CloudFlare di cpanel hosting agar websites lebih cepat diakses