In php:
max_execution_time = 300
In apache2:
Timeout 300
In Nginx:
proxy_read_timeout 300s;
In php:
max_execution_time = 300
In apache2:
Timeout 300
In Nginx:
proxy_read_timeout 300s;
# initializare
dd if=/dev/zero of=/swapfile count=1024 bs=1M
chown root:root /swapfile
chmod 600 /swapfile
# Make it into a swap file
mkswap /swapfile
# Mount swap file
swapon /swapfile
# configurare fstab pentru a pastra la reboot
cp -av /etc/fstab /etc/fstab.bckp
echo /swapfile swap swap defaults 0 0 >> /etc/fstab # Care!! '>>'
for user in $(whmapi1 listaccts | awk '/user:/ {print $2}'); do domain=$(whmapi1 accountsummary user=$user | awk '/domain:/ {print $2}'); assignedip=$(whmapi1 accountsummary user=$user | awk '/ip:/ {print$2}') ; dnsip=$(dig +short $domain); dnsmx=$(dig MX +short $domain @8.8.8.8 | awk '{print $2}' | xargs dig +short); if [[ $dnsip != $assignedip ]]; then echo -n "$user:$domain - A - FAILS"; if [[ "$dnsmx" == "$assignedip" ]]; then echo -e " but MX for $user:$domain does point locally"; else echo ""; fi; fi ; done
Pentru a sterge toate link-urile simbolice(symlinks) din directorul curent:
find . -maxdepth 1 -type l -exec rm -f {} \; |
ps -e h -o pid --sort -pcpu | head -10 | vzpid - |
Va afisa id-ul procesului, id-ul containerului openvz si numele procesului.
La umount pentru o partitie primim mesajul:
umount: /media/sda2: device is busy |
Pentru a verifica ce anume foloseste partitia:
fuser -m /dev/sda2 /dev/sda2: 254308c |
Verificam procesul cu pid-ul 254308
ps aux|grep 254308 mysql 254308 1.3 2.9 509928 120704 |
In cazul de fata e vorba de serviciul mysql.
Pentru interogare rDNS pe langa comanda host se poate folosi dig
dig +noall +answer -x 8.8.8.8
8.8.8.8.in-addr.arpa. 43199 IN PTR google-public-dns-a.google.com.
/usr/local/psa/admin/sbin/autoinstaller |
La pornirea apache apare urmatoarea eroare:
Apache - No space left on device: Cannot create SSLMutex
Solutia:
ipcs -s | grep apache | awk ' { print $2 } ' | xargs ipcrm sem |
Si incercam din nou start la apache.
Varianta 2
Adaugam in /etc/sysctl.conf linia
„kernel.sem = 512 32000 100 512”
si rulam
sysctl -p; service httpd start
Putem da kill la toate procesele unui utilizator cu
kill -9 `ps -u utilizator -o "pid="` |