From 9b2c38b7bd582d9712c3779294a9bccde7bbd548 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 26 Feb 2012 12:22:31 -0800 Subject: let the connection pool of new applications have size 1 rather than 5 The majority of Rails applications are multiprocess, people may wonder why rails new generates a default pool of 5, does my application need a connection pool of 5? By generating a default of 1 database.yml is much more clear, and with the comment people know what is the connection pool for, and they know it has to be bigger for multithread apps. --- railties/guides/code/getting_started/config/database.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'railties/guides/code') diff --git a/railties/guides/code/getting_started/config/database.yml b/railties/guides/code/getting_started/config/database.yml index 51a4dd459d..32a998ad72 100644 --- a/railties/guides/code/getting_started/config/database.yml +++ b/railties/guides/code/getting_started/config/database.yml @@ -6,7 +6,9 @@ development: adapter: sqlite3 database: db/development.sqlite3 - pool: 5 + # Maximum number of database connections available per process. Please + # increase this number in multithreaded applications. + pool: 1 timeout: 5000 # Warning: The database defined as "test" will be erased and @@ -15,11 +17,15 @@ development: test: adapter: sqlite3 database: db/test.sqlite3 - pool: 5 + # Maximum number of database connections available per process. Please + # increase this number in multithreaded applications. + pool: 1 timeout: 5000 production: adapter: sqlite3 database: db/production.sqlite3 - pool: 5 + # Maximum number of database connections available per process. Please + # increase this number in multithreaded applications. + pool: 1 timeout: 5000 -- cgit v1.2.3