The Blog

Linux

(Errcode: 24 – Too many open files) [23] – Plesk Onyx 17.5.3 and Ubuntu 16.04.2 LTS‬

Posted on

As of MySQL 5.7.7, this is what the documentation recommends for Red Hat Enterprise Linux 7, Oracle Linux 7, CentOS 7, SUSE Linux Enterprise Server 12, Fedora 24 and 25:

https://dev.mysql.com/doc/refman/5.7/en/using-systemd.html

On Ubuntu 16.04 the service is called mysql, not mysqld, so this is what I did:

sudo mkdir /etc/systemd/system/mysql.service.d
sudo vi /etc/systemd/system/mysql.service.d/override.conf
Added this in the new file override.conf:

[Service]
LimitNOFILE=1024 4096

Then restarted the service:

sudo systemctl daemon-reload
sudo systemctl restart mysql

and test it with

cat /proc/$(pgrep mysql)/limits | grep files

Posted in Linux, PLESK 362 Comments

Simple script that can save you from blacklist.

Posted on

This simple php scrips can be run by cron job once an hour to let you know if the qmail queue is getting full.


$x = shell_exec('/usr/local/psa/admin/sbin/mailqueuemng -s');

$y = explode("\n", $x);

foreach($y as $z){
$a = explode(":", $z);
$out[trim($a[0])] = trim($a[1]);
}

if ($out['Messages total'] > 100) {

mail('[email protected]', 'Email Problems', print_r($out, true));
}

Posted in Linux, PHP, PLESK Leave a comment
Next Page »