SymptomsResource Usage is configured for domains and clients; however, the configuration does not take effect. Domain limits may be exceeded, although notifications are not sent to the owner and the domain is not suspended.
What is the cause of the problem?
CauseIn Parallels Plesk Panel 9, statistics are processed with the script DailyMaintainance/script.php, which is executed from a daily cron job:
~# cat /etc/cron.daily/50plesk-daily
/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1
The purpose of the script is as follows:
- The script starts the statistics utility, which processes Apache logs for each domain. The utility counts the inbound and outbound traffic and counts the disk space occupied by Web content, log files, databases, mailboxes, Web applications, mailing list archives, and backup files.
- After the statistics utility has finished, the script processes resource usage for Plesk domains/clients/resellers. According to resource usage settings, limits notifications are sent and objects are suspended.
The problem is that the scripts fail due to MySQL execution timeout when statistics is executed. As a result, no notifications are sent and domains/clients with exceeded limits are not suspended.
ResolutionTo resolve the problem, it is recommended to increase MySQL execution time. By default, the server closes the connection after 8 hours if nothing has happened. You can change the time limit by setting the "wait_timeout" variable when you start mysqld.
Open the MySQL configuration file my.cnf and find the wait_timeout variable in the [mysqld] section. If the variable is missing and you want to increase it, it is recommended to add the variable.
By default, the value is 28800, or 8 hours. Please remember to restart mysqld to apply the changes:
~# /etc/init.d/mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
For details about MySQL variables, see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html.