- Понедельник, Декабрь 22, 2025

In Linux-based hosting, managing resources is critical to ensure stability and performance. One often-mentioned resource limit is nproc, short for "number of processes." In this post, we'll explain what nproc is, how it affects different hosting stacks (cPanel/CloudLinux, Nginx, LiteSpeed), and provide appropriate nproc limits for various website sizes. We'll also cover best practices for configuring nproc safely, with a brief note on how Bacloud’s hosting services can support your needs.
What is nproc (Number of Processes)?
In Linux, nproc reports the maximum number of processes a user or service can run simultaneously. In shared hosting, this is usually a per-account limit. For example, in CloudLinux (a popular OS for shared hosting), nproc defines the maximum number of processes inside a user’s Lightweight Virtual Environment (LVE) (such as all the user's shell, cron, PHP, email processes, etc.). In simpler terms, it limits how many separate process instances your account can run at any given time.
This is not to be confused with the nproc shell command that outputs the number of CPU cores. Here, we focus on process count limits. By limiting the number of processes, hosting providers prevent any single user from spawning an excessive number that could overwhelm the server.
Why does nproc matter? Imagine a buggy script or a surge in traffic causing a site to spawn hundreds of processes – without limits, it could exhaust CPU and memory, affecting all customers on a server. The nproc limit is a safety brake. If you hit the limit, the system will block new processes from starting. In CloudLinux-based servers, when a site exceeds its process limit, the user might encounter errors (HTTP 500/503) indicating the server couldn't execute the script. This mechanism ensures no single site can bring down the entire server.
Bacloud offers fast and reliable shared hosting with LiteSpeed technology—perfect for WordPress websites. Enjoy fast loading speeds, security, and easy management. Get started today with Bacloud!
nproc in cPanel/CloudLinux Hosting
In many cPanel shared hosting environments, CloudLinux is used to isolate users. CloudLinux applies per-account limits on CPU, memory, I/O, and processes. By default, CloudLinux sets the nproc (number of processes) limit to 100 processes per account, and a separate “Entry Processes” limit (often 20 by default) for concurrent web connections. The nproc limit counts all processes running under the user, while “Entry Processes” (usually shown as EP) counts concurrent web requests reaching Apache or LiteSpeed at a given moment. Importantly, the nproc limit is typically set higher than the EP limit to allow headroom for background processes or multi-process handling.
For example, Bacloud’s shared hosting plans use CloudLinux to enforce these limits. A basic plan might support around 60 processes, a mid-tier plan around 80, and a top-tier plan about 100 processes simultaneously. These limits are designed for fairness: a small personal site likely never needs 100 processes at once, while a busier site on a higher plan can utilize a larger process allowance. If an account reaches the nproc limit, any attempt to spawn new processes (whether a PHP script, SSH login, or cron job) will be blocked until existing processes finish. In practice, when the limit is reached, new web requests may queue or fail – CloudLinux would serve a “508 Resource Limit Reached” error for excess web connections or fail to execute new processes (resulting in 503 errors for the end-user).
In cPanel, these limits are often visible in the Stats or Resource Usage interface. Frequently exceeding nproc is a sign that the site may be outgrowing shared hosting or needs optimization. Hosts (via WHM or CloudLinux LVE Manager) can adjust per-account nproc limits, but values are kept conservative on shared servers to maintain overall stability.
Implications for cPanel/CloudLinux users: If your site triggers “resource limit reached” errors, it may be hitting the EP or nproc cap. For instance, on heavy WordPress sites without caching, many PHP processes can run concurrently. The solution might be to upgrade your plan to a higher process limit or optimize the site (e.g., enable caching and reduce background tasks). It’s also worth noting that if a site with very low traffic hits an nproc limit, it could indicate an inefficiency or malware causing too many processes per request – a scenario system admins should investigate.
nproc in Nginx/PHP-FPM Environments
Nginx-based hosting stacks handle concurrency differently from Apache. Nginx is event-driven and uses a fixed number of worker processes (commonly tied to CPU cores) rather than spawning a new process for each connection. By default, Nginx sets its worker_processes equal to the number of CPU cores. This means Nginx itself might use only 4 methods to handle thousands of connections asynchronously. As a result, the Nginx web server process count is usually low and stable, and nproc limits are rarely a bottleneck for serving static content.
However, most Nginx-based web hosting also uses PHP-FPM (FastCGI Process Manager) or a similar solution for dynamic content (when running PHP applications). PHP-FPM maintains a pool of worker processes to execute PHP scripts. For example, you might configure PHP-FPM to run 10 or 20 child processes per site, and those processes will count toward the nproc limit for that user. Each website (or each PHP-FPM pool) can spawn workers up to its defined max (e.g., if you set pm.max_children = 20 in PHP-FPM, it can spawn up to 20 PHP processes for that pool).
In a VPS or dedicated server scenario without CloudLinux, you typically won't have a strict nproc cap beyond the system default (which is often in the thousands for root or a high number for regular users). The limiting factor becomes the available CPU and RAM. But it's still wise not to let processes grow without bounds – you configure PHP-FPM pools, Cron jobs, and other daemons with sensible limits to avoid exhaustion of resources. On a controlled platform or container, there may be a cgroup- or container-imposed process limit (for example, some containers limit the total number of processes to protect the host). If you run Nginx in a shared environment (some hosting control panels integrate Nginx as a reverse proxy for Apache or as the central server), any CloudLinux nproc limit still applies to the user’s total processes.
Key impact on Nginx stacks: The nproc limit can be reached if your backend processes grow too large. Suppose a high-traffic site requires a PHP-FPM pool of 50 workers to handle bursts; if the nproc limit for that user is 40, some processes won't be able to start, causing requests to wait or fail. In practice, pure Nginx serving static files won’t spawn extra processes per request, but the app servers or script processes behind Nginx will. Thus, ensure that any user-level process cap accommodates your FPM worker count and other processes. It's a balancing act: enough processes to handle traffic without so many that the server is overwhelmed, or for a single user to abuse the system.
nproc in LiteSpeed Web Server
LiteSpeed Web Server (LSWS), often used as a high-performance alternative to Apache in cPanel hosting (including Bacloud’s shared plans, which use LiteSpeed Enterprise), has its own process model. The web server core is event-driven (similar to Nginx), so it doesn't fork new processes for each request. However, for PHP and other dynamic content, LiteSpeed uses an API called LSAPI and LSphp worker processes (similar to PHP-FPM but managed by LiteSpeed).
By default, LiteSpeed's LSAPI allows up to 100 PHP worker processes per account or virtual host. It will start only as many as needed, but can scale up to that limit to handle concurrent PHP requests. This default aligns with CloudLinux’s typical nproc limit (100). If the hosting environment’s nproc limit is lower than LiteSpeed’s LSAPI process limit, it becomes the bottleneck. For example, if nproc is set to 60 for an account, LiteSpeed might attempt to spawn additional PHP workers under high load, but cannot exceed 60 due to the limit. The result, if demand exceeds that, would be queuing or 503 errors from LiteSpeed when it can’t spawn a needed process.
Hosting providers that use LiteSpeed with CloudLinux typically configure these settings. They might set a LiteSpeed PHP suEXEC concurrency limit equal to or slightly below the CloudLinux Entry Process (EP) limit to avoid reaching the cap (LiteSpeed’s documentation advises ensuring “PHP suEXEC Max Conn” is not higher than the CloudLinux EP limit). In essence, LiteSpeed will honor the nproc constraints: it will not exceed the kernel-level limit set by CloudLinux or ulimit.
For site owners and admins, the impact is similar to Apache: if your site is very busy and needs more PHP processes than are allowed, you’ll hit a limit and see errors or slowdowns. The advantage of LiteSpeed is that its built-in caching (LSCache) and efficient event loop often reduce the number of PHP processes required, enabling many requests to be served from cache or handled as static content with minimal overhead. Still, high-traffic dynamic sites on LiteSpeed should ensure their hosting plan’s nproc limit is high enough, or consider a VPS/dedicated setup if they routinely need dozens of simultaneous PHP processes.
Recommended nproc Limits for Different Website Sizes
How many processes are “enough” for a website? The answer depends on the site’s traffic and workload. Below, we provide general guidance for small, medium, and high-traffic sites, and explain how nproc limits may differ across shared, VPS, and dedicated hosting. (These are approximate ranges – actual needs can vary based on how efficient the web application is and how much caching is in place.)
-
Small sites (low traffic, personal blogs, or simple business sites): Typically, only a few concurrent users. They might use at most a dozen processes at once for web requests and a few background tasks. A low
nproclimit (e.g., 30–50) is usually sufficient on shared hosting. Such sites rarely approach that number of processes. -
Medium sites (moderate traffic, growing blogs or small e-commerce): They may experience tens of concurrent users at peak times. This could translate to 20–50 concurrent PHP processes during busy periods, plus some overhead from other methods. An
nproclimit of ~50–100 is advisable. Many shared hosting plans limit the number of processes to around 100 for this reason. On a VPS, you might allow a bit more (since it's your dedicated slice of resources) – for example, 150 or so – if needed to handle surges. -
High-traffic sites (large e-commerce platforms, popular forums, news sites): These can see hundreds or thousands of concurrent users. On shared hosting, such sites will likely hit the upper limits (often ~100 processes) quickly and are usually encouraged to move to a VPS or dedicated server. On a well-provisioned VPS, an
nproclimit of 200–300 processes can be set if the hardware supports it. On a dedicated server, you might not enforce a strict numerical cap at all, instead allowing the application to scale up to the server’s physical limits (with process counts in the hundreds, if needed). It’s not uncommon for high-performance servers to handle a few hundred worker processes for web apps, but beyond that, scaling out (clustering) is usually more efficient than spawning 1000 processes on a single machine.
The table below summarizes a rough recommendation for nproc (process count limits) by site size and hosting type:
| Traffic Level | Shared Hosting (typical nproc limit) |
VPS Hosting (nproc or practical limit) |
Dedicated Server |
|---|---|---|---|
| Small site (low traffic) | ~30–50 processes limit (sufficient for small loads) | ~100 processes (often default; plenty of headroom) | 100+ (usually no strict limit, small sites won’t use much) |
| Medium site (moderate traffic) | ~50–100 processes (higher-tier shared plan) | 150–200 processes (tune as needed for bursts) | 200+ (dedicated resources, can handle more if needed) |
| High-traffic site (very busy) | ~100 processes (typical max on shared, beyond this upgrade recommended) | 200–300 processes (if VPS has sufficient CPU/RAM) | 300+ or no fixed limit (bound by hardware; configure based on capacity) |
Notes: On shared cPanel hosting, the host sets the limit and values around 100 are standard defaults. Some providers may allow more (for instance, one host sets 200 EP and 220 NPROC for shared accounts), but in general, >100 concurrent processes on shared hosting is rare. On VPS/dedicated servers, you control the configuration; the practical limit is how many processes your server can run before performance degrades.
These ranges assume typical web workloads. A well-optimized site with caching might handle high traffic with far fewer processes. Conversely, a poorly optimized site might need more processes even at lower traffic (or spend a long time in each process). Always consider your application’s characteristics.
Best Practices for Configuring nproc Safely
Setting the correct nproc limit is about balancing safety and performance:
-
Ensure
nproc> Entry Processes (EP): Always set the max process limit higher than the max web connections setting. This accounts for background processes and child processes spawned for each request. CloudLinux explicitly recommends keeping NPROC higher than EP. For example, if you allow 20 concurrent PHP requests (EP=20), you might set NPROC to 100 to accommodate those plus any additional worker processes or cron jobs. -
Align with your web server/PHP settings: Make sure your web stack’s configuration matches the limits. If using LiteSpeed/lsphp, do not configure LSAPI to spawn more PHP workers than
nprocallows. Similarly, if using Apache with mpm_prefork or CGI, understand that each request is a process. If using PHP-FPM, set the pool'smax_childrento keep the total number of processes below your limit. In LiteSpeed, the PHP suEXEC Max Conn should usually be set below the CloudLinux EP limit to avoid hitting ceilings. -
Monitor and adjust: Keep an eye on resource usage. Tools such as CloudLinux’s LVE Manager or lvetop can indicate how close an account is to its
nproclimit. If a site frequently hits the limit (causing 503/508 errors), you may need to raise the limit or better optimize the site. Optimization could include enabling caching, using a CDN, or optimizing code to reduce CPU-intensive operations. -
Don’t set it unnecessarily high: While you want to avoid choking a busy site, setting
nprocto an extremely high number or “unlimited” can be risky on shared systems. A runaway script or malicious attack (fork bomb) could spawn massive processes and bring down the server. The limit exists to provide a controlled failsafe. Even on a dedicated server, you might keep a sensible cap (for example, a ulimit of a few thousand processes for the web user) to prevent accidents. -
Consider CPU and memory in tandem: More processes allow more simultaneous work, but also divide CPU time and consume RAM. If you have a CPU limit (e.g., 1 CPU core per user), spawning dozens of processes doesn't make the site faster – each process gets a smaller CPU slice. In fact, CloudLinux users have observed that when limiting CPU, you should also restrict nproc to prevent too many slow processes from accumulating. The aim is to let just enough processes run to utilize the CPU efficiently without thrashing. Likewise, ensure your memory allocation can handle the number of processes (each process, especially PHP, can use tens of MB of RAM).
-
Investigate anomalies: If a site hits the
nproccap under light traffic, treat it as a red flag. It could mean a background job spawning many processes, or even malware making excessive forks. For instance, a WordPress site with a web shell trojan might execute a hidden crypto-miner that spawns numerous processes. Regular security scans and performance audits can catch such issues.
Finally, always apply changes gradually. If you decide to increase nproc for an account or a VPS, do so incrementally and monitor the impact. The goal is a stable system where each site has enough breathing room without starving others (on shared hosts) or exhausting the server (on a VPS/dedicated).
Conclusion
In summary, nproc is a vital knob in Linux hosting environments for controlling the number of concurrent processes an account or service can run. It ensures fairness and prevents any single site from overusing server resources. In cPanel/CloudLinux setups, it works alongside other limits, such as CPU, memory, and open file descriptors, to constrain each account’s resource usage. In Nginx- and LiteSpeed-based stacks, it determines how many backend workers can run, affecting how well high traffic is handled.
By understanding your website’s traffic volume (small vs. high) and how your server software allocates processes, you can tune nproc limits for optimal performance. Small sites may run comfortably with low process counts, whereas busy sites require higher limits or dedicated resources. Always follow best practices: keep nproc slightly above your peak expected concurrency, monitor usage, and adjust carefully.
As your site grows, remember that hosting is not one-size-fits-all. If you frequently hit resource limits on shared hosting, it might be time to upgrade. Bacloud offers scalable solutions – from VPS plans to fully dedicated servers – allowing you to lift or adjust these limits and dedicate more resources to your applications. With the right hosting environment, properly configured nproc limits will help keep your websites running smoothly and securely as traffic scales.