aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/configuring.textile
diff options
context:
space:
mode:
Diffstat (limited to 'railties/guides/source/configuring.textile')
-rw-r--r--railties/guides/source/configuring.textile8
1 files changed, 3 insertions, 5 deletions
diff --git a/railties/guides/source/configuring.textile b/railties/guides/source/configuring.textile
index e796f44606..2f465b37ed 100644
--- a/railties/guides/source/configuring.textile
+++ b/railties/guides/source/configuring.textile
@@ -652,19 +652,17 @@ The error occurred while evaluating nil.each
h3. Database pooling
-Active Record database connections are managed by +ActiveRecord::ConnectionAdapters::ConnectionPool+ which ensures that a connection pool synchronizes the amount of thread access to a limited number of database connections. This limit defaults to 1 and can be configured in +database.yml+.
+Active Record database connections are managed by +ActiveRecord::ConnectionAdapters::ConnectionPool+ which ensures that a connection pool synchronizes the amount of thread access to a limited number of database connections. This limit defaults to 5 and can be configured in +database.yml+.
<ruby>
development:
adapter: sqlite3
database: db/development.sqlite3
- # Maximum number of database connections available per process. Please
- # increase this number in multithreaded applications.
- pool: 1
+ pool: 5
timeout: 5000
</ruby>
-Since the connection pooling is handled inside of Active Record by default, all application servers (Thin, Mongrel, Unicorn etc.) should behave the same. Initially, the database connection pool is empty and it will create additional connections as the demand for them increases, until it reaches the connection pool limit.
+Since the connection pooling is handled inside of ActiveRecord by default, all application servers (Thin, mongrel, Unicorn etc.) should behave the same. Initially, the database connection pool is empty and it will create additional connections as the demand for them increases, until it reaches the connection pool limit.
Any one request will check out a connection the first time it requires access to the database, after which it will check the connection back in, at the end of the request, meaning that the additional connection slot will be available again for the next request in the queue.