twest we are discussing about the same site that was on cl server before ... Therefore nothing changed .

I follow the idea of it being PHP issue and not limit issue , as @AdamM mentioned , and I wonder if it's now possible to retain those changes

twest

Correct, the limits applied in Enhance are hard limits. They are applied with Linux v2 cgroups which is a core feature of the kernel and works exactly as designed. The nproc limit doesn't kill processes, it prevents them being forked in the first place.

If the site is hitting limits that it didn't on the previous server, it could be to do with full page caching (or lack thereof), MySQL optimisations, CPU/disk performance or many other factors. Generally unless your server is CPU or IO limited it's better to remove the CPU, IOPS and IO limits and just retain RAM and NPROC restrictions. Limiting CPU time means the processes will take longer to serve a request and this will in turn lead to higher RAM and process usage.

    Adam
    I am not sure it's wise to remove the limits on a shared hosting server were there can be abusers , it seems that the issue lies somewhere else with how the limits work, it can't be that a site on the same hardware creates more issues on a server with enhance compared to cl, when cl server has even more websites within it.

    Cl recommends a nproc limit of 100 which is what I am using , on enhance I reduce it but it creates issues in most websites .

      gmakhs

      Enhance uses the default v2 cgroups built into the kernel. CloudLinux, on the other hand, uses the same cgroups technology but has heavily modified and tweaked it to make it more advanced and stable.

      We always set 100 Nproc and 1024 IOPS for all packages, while RAM, CPU, and IO bandwidth are adjusted according to the package. We've never had issues with this setup. Only when we find a user abusing MySQL do we add them to the cPFence Owl blacklist to handle it. Other than that, the cgroups limits have been serving us well.

      Major hosting providers typically set top-level shared hosting plans to 1 vCPU, 1024 IOPS, 8 MB I/O bandwidth, and 1 GB RAM, lowering these limits for smaller plans. You should have no issues if you imitate this setup.

        cPFence I think the basic that is missing here is the EP together along with the nprocwith 100 nproc a website can overload the server because of php resources.
        The solution seems to be now that the litespeed enterprise php max connections is set to lower limit that the nproclike ep is in c, something like 20 for connections and 35 nproc seems to create no issues but I am still testing , it's weird that on cl there is no problem but on enhance the load is huge .

        I also tried the setting you mention in your blog , and the load issue is even worse 🙂
        Server has epic Genoa CPU , with 128 GB of ram

          gmakhs

          What are the system resource settings in the Enhance packages you are using?

          If you use the system resource settings I mentioned above, you should have no issues. The only thing that can bypass these settings is a user abusing MySQL with a poorly written PHP script, plugin, theme, etc.

            gmakhs From my experience, setting IOPS to unlimited works well. Whenever I set IOPS to something like 1024 I do get frequent CPU load spikes to as high as 128, when on a normal day the load is at an average of 3.
            My basic plan has this:

            Memory: 1024MB
            Virtual CPUs: 1
            Nproc: 35
            IO bandwidth: 8MB/s
            IOPS: Unlimited

            You might have a different experience, but on my setup the culprit for high sudden load spikes is when you limit IOPS. Giving it unlimited works perfect.

              cPFence 2 vcpu , unlimited iops , 2 gb ram and it does effect the server greattly if nproc is 100

                gmakhs
                You’re not making use of cgroups with such generous limits. No wonder you’re running into issues.

                  gmakhs do you mind to elaborate please ? Which limit is exesive ?

                  All of them. You’ll never get things under control with those limits unless you have an extremely powerful server. Use the limits I mentioned earlier as a starting point, monitor performance, and adjust as needed. If a client genuinely needs 2 vCPU and 2 GB RAM, they’re probably not suited for shared hosting anymore. Move them to a small VM instead of compromising the limits for everyone else on the shared server.

                    cPFence current server has more resources to allocate than that , and it's fairly empty , the issue Is caused from one website, load jumps from 0.60-080 to 70-120, I see that more people are struggling with similar issues, and the fact that same setting on enhance , with cl and same website, shows that something is wrong with the limits, I will keep poking around and hopefully eventually will figure it out .

                      We fixed this with offering unlimited disk I/O and unlimited IOPS with a limited NPROC set to around 30-50 according the plan, and never have faced such issues from past 1 year or so. RAM and CPU are limited though, but even with heavy e-commerce websites generating over $2000 a month, play happily with our 4 vCPU and 4GB RAM shared environment. It depends on how well the site is optimized and the database queries.
                      As said by @cPFence above, Cloudlinux limits are very different as compared to hard limits cgroups by Enhance.

                      @gmakhs using the same limits nproc 30 on OLS we had 503. using nginx the website runs smoothly (both without caching). i dunno maybe its how OLS spawns its processes.... (honestly did not try to fiddle/tweak the config in OLS as the changes are lost).

                      Here are our findings after doing months of trials n tests when we switched from cloudlinux to enhance,

                      First of all, always always prefer dedicated server or VPS with dedicated resources, do not prefer vps with shared cpu unless you're just hosting 1 or max 3 websites with average traffic, also prefer good provider, follow this respectively as per your need and situation.. and always choose NVMe (recomended) or SSD disk..

                      Use ram:swap in 2:1 ratio, like if your server has 16 GB RAM then use at least 8 GB of swap (again NVMe disk recommended)

                      then set following base optimization config at bottom in /etc/sysctl.conf
                      (now, be careful here, you should monitor and if this works for you then great otherwise tweak it till you find stable spot)

                      vm.swappiness=10
                      vm.vfs_cache_pressure=100
                      vm.dirty_background_ratio = 5
                      vm.dirty_ratio = 20

                      and lastly,
                      We typically use this as basic plan to start,

                      1 vCPU
                      2 GB RAM
                      IO Unlimited
                      IOPS Unlimited
                      35 or 40 NPROC

                      Hope this helps... play around you'll find what works best for you...

                      With 35 NPROC i was in the same boat of the error 503 (using OLS). Than i had to set to 50 for small website and 100 for ecommerce/bigger website, but mall website sometimes gave 503 anyway. So so I turned everything up to 100 NPROC (like i had in Plesk) and now i have no 503, and so I just tune cpu/ram. I'm fine with this config, because a small delay on a website is a lot better than a 503.

                        Vendoz We have a large e commerce site, doing over $4500k/month transactions, and nproc we placed is 50 because before 25 was causing troubles for them, so i can say what kinda server you use plays vital part in it all, resource limit is secondary...

                          Follow @enhancecp