title: Asynchronous requests script crashes with too many URLs
body: <p>I'm trying to check a set of URLs for their status code and return all that are of code 4xx or 5xx.
  In total I need to check about 12500 URLs and my script works fine for up to about 7000 URLs. Above that the script crashes with ResourceWarning unclosed transport error.</p>
  
  <p>I'm using python-3.6 and aiohttp 3.5.4</p>
  
  <p>Any idea what's causing this?</p>
  
  <pre><code>async def fetch(url, session):
      async with session.get(url) as response:
          data = response.status
          return url, data
  
  
  async def bound_fetch(sem, url, session):
      async with sem:
          return await fetch(url, session)
  
  
  async def check_urls(url_list):
      ''' get status code for all urls and write into dictionary '''
  
      base_url = &lt;base_url&gt;   
      tasks = []
  
      sem = asyncio.Semaphore(10)
  
      async with ClientSession() as session:
          for url in url_list:
              full_url = base_url + url
              task = asyncio.ensure_future(bound_fetch(sem, full_url.format(), session))
              tasks.append(task)
  
          results = await asyncio.gather(*tasks)
          results_dict = defaultdict(list)
          for res in results:
              if res[1] != 200 and res[1] != 301 and res[1] != 302:
                  print(f'ERROR {str(res[1])} {res[0]}')
                  results_dict[res[1]].append(res[0])
  
          print(f'URLs checked, found {str(len(results_dict))} errors')
  
  
  ''' main function'''
  loop = asyncio.get_event_loop()
  loop.set_debug(True)
  warnings.simplefilter('always', ResourceWarning)
  future = asyncio.ensure_future(check_urls(list_of_urls))
  loop.run_until_complete(future)
  </code></pre>