Why limit DB Connection Pool Size in SQLAlchemy?
<p>This is a follow-up to a <a href="https://stackoverflow.com/questions/38515488/load-testing-sql-alchemy-timeouterror-queuepool-limit-of-size-3-overflow-0-re">question</a> I posted earlier about DB Connection Pooling errors in SQLAlchemy.</p>

<p>According to the SQLAlchemy <a href="http://docs.sqlalchemy.org/en/latest/core/pooling.html#api-documentation-available-pool-implementations" rel="noreferrer">docs</a> the <code>sqlalchemy.pool.QueuePool.__init__()</code> method takes the following argument:</p>

<blockquote>
  <p><strong>pool_size</strong> – The size of the pool to be maintained, defaults to 5. This
  is the largest number of connections that will be kept persistently in
  the pool. Note that the pool begins with no connections; once this
  number of connections is requested, that number of connections will
  remain. pool_size can be set to 0 to indicate no size limit; to
  disable pooling, use a NullPool instead.</p>
</blockquote>

<p>What are the drawbacks to setting pool_size=0? What is the benefit of limiting the connection pool size? Is it just to save memory? The database shouldn't really care if a large number of unused connections are open, right?</p>