You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Rails 5 + Unicorn + Octopus with 3 Postresql database shards (all of them share the same schema). Everything seems to work well but I cannot seem to get schema cache to work, my database shards are always hit by queries like below when a web worker is started (I think the correct behavior should be no query at all):
SELECTa.attnameFROM
(SELECT indrelid,
indkey,
generate_subscripts(indkey, $1) idx
FROM pg_index
WHERE indrelid = $2::regclass
AND indisprimary ) i
JOIN pg_attribute a ONa.attrelid=i.indrelidANDa.attnum=i.indkey[i.idx]
ORDER BYi.idx;
Is this a bug with octopus or am I doing something wrong here? I have schema cache enabled with config.active_record.use_schema_cache_dump = true in my Rails config file. Below is my Unicorn config:
preload_apptrueafter_forkdo |server,worker|
# START OF OCTOPUS SPECIFIC CONFIGActiveRecord::Base.connection_proxy.initialize_shards(Octopus.config)# END OF OCTOPUS SPECIFIC CONFIGend
The text was updated successfully, but these errors were encountered:
I am using Rails 5 + Unicorn + Octopus with 3 Postresql database shards (all of them share the same schema). Everything seems to work well but I cannot seem to get schema cache to work, my database shards are always hit by queries like below when a web worker is started (I think the correct behavior should be no query at all):
Is this a bug with
octopus
or am I doing something wrong here? I have schema cache enabled withconfig.active_record.use_schema_cache_dump = true
in my Rails config file. Below is my Unicorn config:The text was updated successfully, but these errors were encountered: