From 2d07cb57714b7aae96593c8ff293c1c3010a13f9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 2 Apr 2017 21:12:18 +0200 Subject: [PATCH] Catching rack timeout from rails doesn't work --- app/controllers/application_controller.rb | 8 -------- app/views/errors/503.html.haml | 5 ----- 2 files changed, 13 deletions(-) delete mode 100644 app/views/errors/503.html.haml diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index abfb5bb8c1c..ef9364897c9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -12,7 +12,6 @@ class ApplicationController < ActionController::Base rescue_from ActionController::RoutingError, with: :not_found rescue_from ActiveRecord::RecordNotFound, with: :not_found rescue_from ActionController::InvalidAuthenticityToken, with: :unprocessable_entity - rescue_from Rack::Timeout::RequestExpiryError, Rack::Timeout::RequestTimeoutError, with: :request_timeout before_action :store_current_location, except: :raise_not_found, unless: :devise_controller? before_action :set_locale @@ -70,13 +69,6 @@ class ApplicationController < ActionController::Base end end - def request_timeout - respond_to do |format| - format.any { head 503 } - format.html { render 'errors/503', layout: 'error', status: 503 } - end - end - def current_account @current_account ||= current_user.try(:account) end diff --git a/app/views/errors/503.html.haml b/app/views/errors/503.html.haml deleted file mode 100644 index f88d50d3655..00000000000 --- a/app/views/errors/503.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- content_for :page_title do - Request timeout - -- content_for :content do - It took too long to process your request. This might be a temporary server issue