title: Why and when "Thread limit exceeded replacing blocked worker" is triggered when I use parallelStream in Java11
body: <p>I have a java11 app running a long time and recently I find this occurs more and more day by day </p>
  
  <blockquote>
    <p>java.util.concurrent.RejectedExecutionException: Thread limit exceeded replacing blocked worker</p>
  </blockquote>
  
  <p>I know I should not put too much blocking operation within <code>parallelStream</code> but I should try my best to accelerate the code above so that I response my request asap.</p>
  
  <pre><code>IntStream.range(0, nums).parallel().forEach((x) -&gt; {
     IntStream.range(0, nums2).parallel().forEach((y) -&gt; {
        IntStream.range(0, 20).parallel().forEach((z) -&gt; {
      // do some business logic which use jni and cost cpu much ,mean rtt is about 400ms and sometimes upper99 could reach 10s.
        });
     });
  });
  </code></pre>