Add warn_on_records_fetched_greater_than setting (#3182)

This commit is contained in:
rhymes 2019-06-17 17:23:41 +02:00 committed by Mac Siri
parent f9fb76ec97
commit ba520f79c9

View file

@ -45,6 +45,11 @@ Rails.application.configure do
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
# Allows setting a warning threshold for query result size.
# If the number of records returned by a query exceeds the threshold, a warning is logged.
# This can be used to identify queries which might be causing a memory bloat.
config.active_record.warn_on_records_fetched_greater_than = 1500
# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.