• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Plesk daily job overwhelming server / MySQL

OlgaKM

Basic Pleskian
I am having an issue where the Plesk daily job (/usr/local/psa/admin/plib/DailyMaintainance/script.php) is overwhelming the server, particularly MySQL. This happens for between 5-10 minutes every day when the job is running. As far as I can see what is happening is that the job consumes so many resources that processes connect to MySQL, but are left hanging because they don't have the resources to run and this results in them taking up MySQL connections. Eventually, new processes start receiving a 'Too many connections' error. The max_connection limit for mysql is set to 512.

Is there a way to limit the resources used by the daily job?
 
Last edited:
Thank you serverpoint, that link was very helpful in diagnosing the issue. Ultimately, the solution I used was to use cgroups to limit disk i/o of the process.

Code:
service cgconfig start
cgcreate -g blkio:/limit1M
cgset -r blkio.throttle.write_bps_device="8:0 1048576" limit1M
cgset -r blkio.throttle.read_bps_device="8:0 1048576" limit1M

Then, in the file /etc/cron.daily/50plesk-daily, I changed the following line:

Original line:
Code:
/usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1

Modified line:
Code:
cgexec --sticky -g blkio:/limit1M /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php >/dev/null 2>&1
 
Back
Top