title: aiohttp.web + aiopg + sqlalchemy: random "cursor.execute() called while another coroutine is already waiting for incoming data" under load
body: <p>I have a trivial <code>aiohttp.web</code> application that executes SQL requests via <code>aiopg</code> sqlalchemy integration. It's as simple as:</p>
  
  <pre><code>import aiohttp.web
  from aiopg.sa import create_engine
  
  app = aiohttp.web.Application()
  
  
  async def rows(request):
      async with request.app["db"].acquire() as db:
          return aiohttp.web.json_response(list(await db.execute("SELECT * FROM table")))
  
  app.router.add_route("GET", "/rows", rows)
  
  
  async def init(app):
      app["db"] = await create_engine(host="postgres", user="visio", password="visio", database="visio")
  
  if __name__ == "__main__":
      loop = asyncio.get_event_loop()
      handler = app.make_handler()
  
      loop.run_until_complete(init(app))
  
      loop.run_until_complete(loop.create_server(handler, "0.0.0.0", 80))
      loop.run_forever()
  </code></pre>
  
  <p>When server load reaches 100 rps, this error starts appearing randomly:</p>
  
  <pre><code>RuntimeError: cursor.execute() called while another coroutine is already waiting for incoming data
    File "aiohttp/server.py", line 261, in start
      yield from self.handle_request(message, payload)
    File "aiohttp/web.py", line 88, in handle_request
      resp = yield from handler(request)
    File "visio_longer/views/communicate/__init__.py", line 72, in legacy_communicate
      device = await query_device(db, access_token)
    File "visio_longer/views/communicate/__init__.py", line 31, in query_device
      (Device.access_token == access_token)
    File "aiopg/utils.py", line 72, in __await__
      resp = yield from self._coro
    File "aiopg/sa/connection.py", line 103, in _execute
      yield from cursor.execute(str(compiled), post_processed_params[0])
    File "aiopg/cursor.py", line 103, in execute
      waiter = self._conn._create_waiter('cursor.execute')
    File "aiopg/connection.py", line 186, in _create_waiter
      'already waiting for incoming data' % func_name)
  </code></pre>
  
  <p>It happens with random queries at random times, once in a few days, sometimes these errors come in bunch of 4 or 2. Is there something wrong with my code? <code>aiohttp</code> and <code>aiopg</code> versions are latest from pip</p>