-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
in lib/rails/generators/mongoid/config/templates/mongoid.yml
- The timeout to wait to execute operations on a socket before raising an error.
- (default: 5)
- socket_timeout: 5
in docs/reference/configuration.txt
- The timeout to wait to execute operations on a socket before raising an error.
- (default: nil)
socket_timeout: 5
It appears the latter is correct–the default socket timeout is nil.
As a real-world mongo user, I would suggest we set the default to 5 seconds in the next major release (Mongoid 8.0) Something conservative like 30 seconds would make sense to add as a default now.
Given that large queries are done using GET_MORE cursors (which will not be subject to the timeout as long as each iteration is under X sec), there is really no practical case where you'd want to set it to something higher than 30 seconds; it typically means your queries are unindexed and you're going to kill your database.
Don't ask me how I know
- is related to
-
RUBY-2939 UPDATE operations + socket_timeout setting
- Closed
- links to