Skip to content

Commit bd5e222

Browse files
committed
app/controllers/catalog_controller.rb: disable Blacklight logging of searches to searches database table
1 parent d8fe523 commit bd5e222

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/controllers/catalog_controller.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ class CatalogController < ApplicationController
1010
#
1111
# rescue_from Blacklight::Exceptions::InvalidRequest, with: :my_handling_method
1212

13+
# Effectively disable the `before_action :set_current_search_session, { only: :index}`
14+
# registered by Blacklight::Catalog:
15+
# - https://github.com/projectblacklight/blacklight/blob/7ab22ddebb7f47c34a4f5011585ea6428ab44884/app/controllers/concerns/blacklight/catalog.rb#L30
16+
# - https://github.com/projectblacklight/blacklight/blob/75ac3e1dc7a0d346f0c3fcd4ee6228c1c4458f22/app/controllers/concerns/blacklight/search_context.rb#L12-L15
17+
# We had an outage on 5/12/25 due to MySQL out of disk errors caused by the
18+
# continuous super-high search traffic generated by web crawlers.
19+
before_action :set_current_search_session, if: -> { false }
20+
1321
configure_blacklight do |config|
1422
## Specify the style of markup to be generated (may be 4 or 5)
1523
# config.bootstrap_version = 5

0 commit comments

Comments
 (0)