diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf index 9488d807f..19c1ce63d 100644 --- a/config/discourse_defaults.conf +++ b/config/discourse_defaults.conf @@ -130,3 +130,8 @@ connection_reaper_max_age = 600 # IMPORTANT: path must not include a trailing / # EG: /forum relative_url_root = + +# increasing this number will increase redis memory use +# this ensures backlog (ability of channels to catch up are capped) +# message bus default cap is 1000, we are winding it down to 100 +message_bus_max_backlog_size = 100 diff --git a/config/initializers/004-message_bus.rb b/config/initializers/004-message_bus.rb index 940ae75a1..41d5386c5 100644 --- a/config/initializers/004-message_bus.rb +++ b/config/initializers/004-message_bus.rb @@ -71,11 +71,10 @@ end # Point at our redis MessageBus.redis_config = GlobalSetting.redis_config +MessageBus.reliable_pub_sub.max_backlog_size = GlobalSetting.message_bus_max_backlog_size MessageBus.long_polling_enabled = SiteSetting.enable_long_polling MessageBus.long_polling_interval = SiteSetting.long_polling_interval - - MessageBus.cache_assets = !Rails.env.development? MessageBus.enable_diagnostics