Created
April 17, 2014 16:43
-
-
Save pjkelly/10997018 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mongoid 3.x | |
# | |
# As discussed in: http://blog.mongolab.com/2014/02/mongodb-driver-tips-tricks-mongoid-3 | |
# | |
production: | |
sessions: | |
default: | |
# The standard MongoDB connection URI allows for easy replica set | |
# connection setup. | |
# Use environment variables or a config file to keep your | |
# credentials safe. | |
uri: 'mongodb://username:password@host1:port1,host2:port2/database' | |
options: | |
# The default consistency is :eventual, which reads from | |
# secondaries when possible. | |
# Strong forces reads to primary. | |
# We recommend using strong consistency. | |
consistency: :strong | |
# max_retries specifies the number of times to attempt an | |
# operation before giving up. | |
max_retries: 30 | |
# retry_interval specifies the number of seconds to wait before | |
# retrying a single operation. | |
retry_interval: 1 | |
# The default timeout is 5, which is the time in seconds for an | |
# operation to time out. | |
# We recommend 15 because it allows for plenty of time in most | |
# operating environments. | |
# Mongoid doubles the configured value (known issue) so 15 | |
# results in a timeout of 30s. | |
# Note that if you have a long-running query (over 30 seconds), | |
# it will time out. | |
# See our example for long-running queries in the blog post | |
# referenced above. | |
timeout: 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment