title: Dealing with aiohttp session.get() timeout issues for large amout of requests
body: <p>I struggle to find a lot of documentation on <strong>aiohttp</strong>, specially some recent one. I keep going through the same few pages again and again, github issues and documentation mostly and can't find the key to my problem.</p>
  
  <p><strong>The problem is that while doing a lot of requests, the pending ones timeout before they get to be sent.</strong></p>
  
  <p>This is due to the request's (<em>session.get()</em>) default timeout of 5 minutes which counts from the time the await is done and not the actual request if I understand it well.
  Thus I am blocked because leaving <strong>a fixed timeout will cancel (timeout) all the pending requests after that time</strong> or having <strong>timeout set to <em>None</em> will make the the program wait indefinitely</strong> on the non responding sites.
  The same problem is raised in <a href="https://github.com/aio-libs/aiohttp/issues/3203" rel="nofollow noreferrer">this issue</a> but I don't get the workarounds.</p>
  
  <p>Here's my failing code:</p>
  
  <pre><code>async def request(session, url):
      try:
          resp = await session.get(url)
      except:
          "FAIL"
      else:
          "SUCCESS"
  
  async def session():
      urls = loadUrls()
      coros = []
      async with aiohttp.ClientSession() as session:
          for url in urls:
              coros.append(request(session, url))
          await asyncio.gather(*coros, return_exceptions=True)
  
  def main():
      loop = asyncio.new_event_loop()
      loop.run_until_complete((session()))
      loop.close()
  </code></pre>
  
  <p>I've tried, to set the TCPConnector limit=None, with no success.</p>
  
  <p>I saw some people talking about using asyncio.wait instead of asyncio.gather, but as in the issue 3203 shown above, no success.</p>
  
  <p>I've tried to set a ClientSession per each request with no succes but this might be because my lack of understanding.</p>
  
  <p>Thank you for your guidance.</p>