title: RuntimeError: can't start new thread, but works with sudo
body: <pre><code>from threading import Thread
  
  def salut():
      print(&quot;sal&quot;)
  
  
  th = Thread(target=salut, args=[])
  th.start()
  th.join()
  </code></pre>
  <p>So I have this code and running it by the following command:</p>
  <pre><code>python3 main.py
  </code></pre>
  <p>Will give me the following error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;main.py&quot;, line 8, in &lt;module&gt;
      th.start()
    File &quot;/usr/lib/python3.8/threading.py&quot;, line 852, in start
      _start_new_thread(self._bootstrap, ())
  RuntimeError: can't start new thread
  </code></pre>
  <p>But if I run it with sudo:</p>
  <pre><code>sudo python3 main.py
  </code></pre>
  <p>It works just as intended and prints sal.</p>
  <p>Why is this the case? This happens on Ubuntu Server 20.04 LTS but on any other pc that I have which runs Ubuntu Desktop 20.04 LTS it works without sudo.</p>