title: Python flask-SQLAlchemy query time out error
body: <p>I am using flask-sqlalchemy library in python to management my database(my sql). 
  However when I test query, it give me this error:</p>
  
  <pre><code>sqlalchemy.exc.TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 10
  </code></pre>
  
  <p>Test code is simple:</p>
  
  <pre><code> def test_query(self, i):
          random = str(i)
          result = Dao.query_user_by_nick("kael")
          print("end query at %s, id: %s" % (datetime.datetime.now(), random), "\n result: " + str(len(result)))
  
  
  
  threads = []
      for i in range(0,100):
          test = threading.Thread(target=test_query, args=(self, str(i)))
          threads.append(test)
      for t in threads:
          t.start()
  </code></pre>
  
  <p>The implement of query_user_by_nick is:</p>
  
  <pre><code>@classmethod
  def query_user_by_nick(self,name):
      user = User.query.filter_by(nick_name=name).all()
      return user
  </code></pre>
  
  <p>When I running the query in multi-thread, this error will always always happen, and I have no idea why it will be. I also insert some data in multi-thread and it works fine.
  I searched around and nothing inspired me. Someone said the connection will be limited to 15, but this database will be query very frequently and can not be just like 15 query at some time or similar.
  I am happy if anyone could give me any suggestion. Thanks in advance.</p>