Seeing this error in Sidekiq jobs that I find hanging out in the Retries group. The problem is intermittent; I can retry the jobs and they will all process after a few attempts. This problem can hold up signup emails though. This is for a multi site installation using the Docker install and most recent Discourse.
NameError: uninitialized class variable @@db_spec_cache in RailsMultisite::ConnectionManagement
I don’t see a way to get a more detailed backtrace for this. Looking in the code, this is the only place where
@@db_spec_cache is referenced without checking if it’s defined first: https://github.com/discourse/discourse/blob/master/vendor/gems/rails_multisite/lib/rails_multisite/connection_management.rb#L180 but I didn’t see how this would be called before
@@db_spec_cache was set.