On most Linux based environments, by default the ulimit for that shell is set to a low number which can cause this error.
Ulimit provides control over the resources available to the shell and to processes started by it, on systems that allow such control.
To check this try executing "ulimit -a" command on the terminal and see the "max user processes", ie, "nproc " field.
It is generally set to a number like 1024 by default, so we would need to increase the value of this field because under the hood Linux treats threads and processes as one and the same(in terms of numbers). This will not allow us to have more than 1024 processes and threads collectively, so increasing this value may help resolve this issue.
To change the value of "max user processes", you can use the following command in Linux shell:
ulimit -u 63536
When you check the ulimit -a again you should now see the new max user processes.