aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorPrem Sichanugrist <s@sikac.hu>2019-03-23 16:47:26 +0900
committerPrem Sichanugrist <s@sikac.hu>2019-03-23 19:31:03 +0900
commitb27105252bce6a69f6d57c05d4ea28d20e84f8ae (patch)
tree13072d72ae90d7c83597b6c832799454aba13b75 /guides/source
parentefb706daad0e2e1039c6abb4879c837ef8bf4d10 (diff)
downloadrails-b27105252bce6a69f6d57c05d4ea28d20e84f8ae.tar.gz
rails-b27105252bce6a69f6d57c05d4ea28d20e84f8ae.tar.bz2
rails-b27105252bce6a69f6d57c05d4ea28d20e84f8ae.zip
Add config.disable_sandbox option to Rails console
A long-running `rails console --sandbox` could cause a database server to become out-of-memory as it's holding on to changes that happen on the database. Given that it's common for Ruby on Rails application with huge traffic to have separate write database and read database, we should allow the developers to disable this sandbox option to prevent someone from accidentally causing the Denial-of-Service on their server.
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/configuring.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index a61ba5dc9f..b167e1a452 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -86,6 +86,8 @@ application. Accepts a valid week day symbol (e.g. `:monday`).
end
```
+* `config.disable_sandbox` controls whether or not someone could start a console in sandbox mode, as a long session of sandbox console could lead database server to run out of memory.
+
* `config.eager_load` when `true`, eager loads all registered `config.eager_load_namespaces`. This includes your application, engines, Rails frameworks, and any other registered namespace.
* `config.eager_load_namespaces` registers namespaces that are eager loaded when `config.eager_load` is `true`. All namespaces in the list must respond to the `eager_load!` method.