Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Rails has <a href="http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/ConnectionPool.html" rel="nofollow">connection pooling built in</a>:</p> <blockquote> <ol> <li>Simply use ActiveRecord::Base.connection as with Active Record 2.1 and earlier (pre-connection-pooling). Eventually, when you’re done with the connection(s) and wish it to be returned to the pool, you call ActiveRecord::Base.clear_active_connections!. This will be the default behavior for Active Record when used in conjunction with Action Pack’s request handling cycle.</li> <li>Manually check out a connection from the pool with ActiveRecord::Base.connection_pool.checkout. You are responsible for returning this connection to the pool when finished by calling ActiveRecord::Base.connection_pool.checkin(connection).</li> <li>Use ActiveRecord::Base.connection_pool.with_connection(&amp;block), which obtains a connection, yields it as the sole argument to the block, and returns it to the pool after the block completes.</li> </ol> </blockquote> <p>This has been available <a href="http://guides.rubyonrails.org/2_2_release_notes.html#connection-pooling" rel="nofollow">since version 2.2</a>. You'll see a <code>pool</code> parameter in your <code>database.yml</code> for controlling it:</p> <blockquote> <p><code>pool</code>: number indicating size of connection pool (default 5)</p> </blockquote> <p>I don't think there would be much point in layering another pooling system underneath it and it could even confuse AR's pooling if you tried it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload