title: Using Gevent inside locust task increases exponentially
body: <p>I have a web server whose REST API I want to load test. I use locust==2.5.1, python==3.8.2.</p>
  <p>Locust Config:</p>
  <ul>
  <li>Users:3</li>
  <li>Spawn Rate: 3</li>
  </ul>
  <pre><code>from locust import HttpUser, task, between, constant_throughput
  import configparser
  from gevent.pool import Group
  
  
  file_path = &quot;./sample/sample.wav&quot;
  num_of_parallel_requests = 3
  
  class FileTranscribeUser(HttpUser):
      @task(1)
      def file_transcribe_request(self):
          group = Group()
          
          for i in range(0, num_of_parallel_requests):
              group.spawn(lambda:self.client.post(&quot;/parse&quot;, 
                          files = {'audio': open(file_path, 'rb')}))
  </code></pre>
  <p><strong>Expected results:</strong>
  Rquests per second to 2 always</p>
  <p><strong>Actual Results:</strong>
  Requests shot up from 0 to 66 and increasingly crashing my server that is running locally (locoust is also running locally).</p>
  <p>I referred to this <a href="https://medium.com/@Sudarsan_M/performance-testing-using-locust-with-parallel-requests-1f51a2065be4" rel="nofollow noreferrer">article</a> for implementation:</p>
  <p>Blockquote</p>