Managing Slow Queries and Scripts Using cPFence Owl™

Do you miss the CloudLinux and CageFS features you had in cPanel after switching to the Enhance control panel? No worries—cPFence Owl™ has you covered. With its advanced monitoring and resource management tools, Owl™ automatically handles slow queries, poorly written scripts, and resource-hungry processes, helping you maintain optimal server performance without the need for manual intervention.

This guide will show you how to configure this feature.

 

Tip: Please keep in mind that this setting alone will not fully control high resource usage. To effectively manage server load, it’s crucial to set CPU and RAM limits directly within the Enhance control panel. We suggest starting with limits like 0.4 CPU and 500 MB of memory for high-usage users and adjusting based on observed behavior. Avoid allocating too many resources to potentially abusive accounts; for instance, assigning 2 vCPUs can often lead to resource abuse.

Unless your server has 36+ powerful vCPUs, sticking to around half a vCPU for high-usage accounts is recommended. Major hosting providers typically set top shared hosting plans to 1 vCPU, 1024 IOPS, and 8 MB I/O bandwidth. You can also implement these limits specifically for blacklisted users to prevent abuse while maintaining resources for others using the "Overrides" page in Enhance control panel.

Step 1: Review the High Load Notification

When you receive a high load notification from the cPFence Owl™ module, check the attached details in the notification email. These will help you identify any user or process that is causing excessive load on your server.

Step 2: Add Abusive Users to the Blacklist

If you identify any user abusing server resources, you can automatically terminate their hung processes or long-running MySQL queries by adding their username to the blacklist. To do this, edit the following file:

/opt/cpfence/config.conf

In the file, add the user's username to the blacklist in the following format:

BLACKLISTED_USERS="Username1_|Username2_|Username3_"
MAX_EXECUTION_DURATION="30"

This will ensure that any process or MySQL query from the blacklisted user that exceeds the maximum execution time (e.g., 30 seconds) will be automatically terminated, freeing up server resources.

 

Is It Recommended to Apply This Feature for All Users?

No, because some "good" scripts sometimes require more time to complete certain tasks and will barely cause any issues to server load. On the other hand, poorly written scripts, plugins, and themes can cause serious problems. It’s recommended to only apply this feature to users who are abusing server resources to avoid unnecessary disruptions.

Can This Feature Cause Issues for Sites and Configurations?

No, it will only stop long, slow queries, helping you manage server resources more efficiently. Users will not even notice it happening. However, it’s always a good practice to communicate with your client and discuss ways they can improve their scripts, plugins, and themes to avoid such issues in the future.

 


Need Further Assistance?

If you encounter any issues or need additional help, feel free to reach out to our support team via your client portal.

  • 4 کاربر این را مفید یافتند
آیا این پاسخ به شما کمک کرد؟

مقالات مربوطه

How to Enable / Disable cPFence Owl™ ?

cPFence Owl™ is a smart 24/7 monitoring system that provides advanced security features,...

What is cPFence Owl™ / DDos Protection ?

cPFence Owl Monitoring Features cPFence Owl™ offers comprehensive monitoring features to keep...