remove extra logging to debug Passenger connection orphan issue

refs CNVS-37760

Change-Id: I99889adc330c214748719bf60ef3a2e4ff877c0e
Reviewed-on: https://gerrit.instructure.com/118597
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2017-07-11 15:59:57 -06:00
parent 8134a69d39
commit 9786b67804
2 changed files with 0 additions and 17 deletions

View File

@ -1,7 +1,6 @@
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
$booted = true
if defined?(CanvasRails)
run CanvasRails::Application
else

View File

@ -1333,19 +1333,3 @@ module ReadonlyCloning
end
end
ActiveRecord::Base.prepend(ReadonlyCloning)
module ConnectionLeaseLogging
def lease
if @owner
::Rails.logger.error("Connection in use by thread - status: #{@owner.status}")
::Rails.logger.error("variables: #{Hash[@owner.keys.map{|v| [v, @owner[v]]}]}")
::Rails.logger.error("backtrace: #{@owner.backtrace}")
end
if Thread.current[:name] == 'Main thread' && $booted
::Rails.logger.error("Accessing connection from the Passenger Main thread")
::Rails.logger.error("backtrace: #{caller}")
end
super
end
end
ActiveRecord::ConnectionAdapters::AbstractAdapter.prepend(ConnectionLeaseLogging)