The short answer: the number of processes limit counts everything alive in the account at the same moment: PHP requests, cron jobs, scripts, Terminal sessions, Node.js or Python apps. A stuck process counts even while doing nothing, and keeps counting until someone ends it. The usual culprits are cron jobs that overlap and scripts that wait forever. You see them in the cPanel Terminal, end them with kill and prevent them with flock and timeout.
Signs of too many processes
| What you see |
Likely cause |
| The processes graph in Resource Usage runs along the limit, with CPU low |
Idle processes: overlapping cron jobs, scripts waiting on an API that never answers |
| The number of processes grows during the day and never comes down |
A cron job that starts again before the last run has finished, and none of them finish |
| A cron job stopped running or stopped sending its e-mail |
There is no room to start a new process, or the previous run is still going. See also a cron job that does not run |
| The Terminal will not open, or says fork: Resource temporarily unavailable |
The account is at its process limit: it cannot even start the command line |
| 508 errors on the site without a spike in visits |
Stuck processes are holding the slots meant for visitors |
| Scripts started by hand days ago, with nohup, still alive |
Imports or tests forgotten after closing the session |
Finding and clearing stuck processes
| 1 |
Open the Terminal in cPanel (the cPanel Terminal) and list your processes with the age of each: ps -u "$(whoami)" -o pid,etime,args. The ELAPSED column says how long each one has been alive. You only see your own, never another account’s.
|
|
| 2 |
Spot the stuck ones: the same script repeated many times, or a script hours or days old when it should take minutes. Lines that say only lsphp, with no file name, belong to the web server serving your site: leave them alone.
|
|
| 3 |
Think before ending it. If it is an import, a backup or a database write, ending it halfway may leave the data halfway. Make sure you have a recent backup, or that you can run the job again from the start.
|
|
| 4 |
End it using the number in the first column (the PID): kill 12345. If it is still there after a few seconds, kill -9 12345. Several copies of the same script: first see which ones it would catch with pgrep -af report.php, and only then pkill -f report.php.
|
|
| 5 |
Stop it happening again. In the cron job, put flock -n in front of the command (if the last run is still going, the new one does not even start) and timeout with a maximum time (after that, the script is ended). For example, swap ACCOUNT for your account name: /usr/bin/flock -n /home/ACCOUNT/tmp/report.lock /usr/bin/timeout 15m /usr/local/bin/php -q /home/ACCOUNT/scripts/report.php
|
|
| 6 |
Set timeouts inside the code on calls to other services (in PHP’s cURL, the timeout options), so a script does not wait forever for an answer that never comes.
|
|
| 7 |
Review the frequency in Cron Jobs: a job should not run more often than it takes to finish. Schedule examples: cron jobs.
|
|
Optimise or upgrade?
| Situation |
Optimise or upgrade? |
| Stuck processes, or the same script repeated |
Optimise. Clean up and add flock and timeout. A bigger plan would only give them more slots to fill. |
| Every-minute cron jobs that take longer than a minute |
Optimise. Space them out and prevent overlap. |
| Scripts waiting on outside APIs |
Optimise. Timeouts on the calls. |
| All clean, and the processes are real site requests at your busiest hours |
Upgrade. |
| You need background processes always running (queues, chatbots, automations, workers) |
VPS or Cloud. On shared hosting those processes compete with your site: shared hosting vs VPS. |
Bigger plans
Each plan up allows more processes at the same time: from 60 on Pro to 200 on Business Ultra (table below). Yours is the limit line in Resource Usage. You upgrade in Meu Interweb, pay only the difference until renewal, and the site, the e-mail and the files stay where they are: how to upgrade your plan. Which plan comes after yours: which hosting plan comes next.
| Plan |
Number of processes (NPROC) |
| Pro |
60 |
| Plus |
80 |
| Ultra |
100 |
| Business Pro |
120 |
| Business Plus |
150 |
| Business Ultra |
200 |
Our warnings: when the account reaches 75%, 85% and 95% of the limit of a plan resource, you get an e-mail with every resource on the account, each with its limit and the percentage you use, and the upgrade plans (between 75 and 85%, every 15 days; between 85 and 95%, every 7 days; from 95%, every 3 days). If several resources are close to the limit, they all come in the same e-mail. The limit is 100%. Above it the account may be suspended, and we always warn you the day before. To bring it back, upgrade (the account reactivates by itself straight after) or ask for 24 hours to sort it out from the link in the e-mail: the account stays active for 24 hours and, if it is still over the limit at the end, it is suspended again straight away (you can ask for the 24 hours once every 7 days). If usage drops back below the limit, the account becomes active again by itself. What each warning means is in usage warnings at 75%, 85% and 95%.
|
Never type kill -9 -1 or pkill -u with your account name. They end all your processes at once, including the Terminal itself and any backups or imports halfway through. End them one by one, by PID, after checking what each one is.
|
|
Want to know whether a cron job finished? Make the last line of the script write the date to a log file. If the date does not appear, the job never reached the end, and the process may be stuck: a cron job that does not run or sends no output.
|
|
Terminal will not open, or the processes come straight back? Tell us the domain and the time, and we will look with you.
Open a support ticket
|
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from 5.940,00 Kz/mo (3-year plan, with coupon) See plans |