In production we get the following error from our rails & sidekiq processes saying that “Mysql2::Error: Table ‘database.OUR_OBJECTS’ doesn’t exist”. It is often the same table (though not always) and that table exists, but is called
our_namespace_our_objects. It is one of our busiest tables.
Our object is in a namespace –
OurNamespace::OurObject defined like this:
module OurNamespace def self.table_name_prefix 'our_namespace_' end end
class OurNamespace::OurObject < ApplicationRecord end
if the request gets tried again, another process will service it just fine. What causes rails to not load
our_namespace.rb before trying its query?