From 9eaea22fac3edec0eda81299cb1f8d2ee8b4c457 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 26 Apr 2022 20:29:00 -0500 Subject: [PATCH] rails: disable Server-Timing header in production. This produces random `nil can't be coerced into Float (TypeError)` errors in production because of a Rails bug. This may also be the cause of random `An unhandled lowlevel error occurred. The application logs may have details` errors. https://github.com/rails/rails/issues/44167 --- config/environments/production.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 60495dcdd..8ff1fcb90 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -17,7 +17,9 @@ Rails.application.configure do config.action_controller.perform_caching = true # Enable server timing - config.server_timing = true + # XXX Re-enable after the fix for rails 44167 is released + #config.server_timing = true + config.server_timing = false # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"] # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).