RequestStore not always active in production?
I've been trying to understand why loading a merge request takes 268 PostgreSQL queries, and I noticed this duplicate query when loading https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29724/diffs:
I've also noticed the ref name caching Gitaly is not working either:
Both of these things should have been cached via RequestStore
.
Running gitlab-rake middleware
on the deploy node seems right:
use Raven::Rack
use Gitlab::Metrics::RequestsRackMiddleware
use Rack::Sendfile
use ActionDispatch::Executor
use Rack::Runtime
use Rack::MethodOverride
use ActionDispatch::RequestId
use RequestStore::Middleware
use Gitlab::RequestContext
use ActionDispatch::RemoteIp
use Rails::Rack::Logger
use Gitlab::Middleware::BasicHealthCheck
use ActionDispatch::ShowExceptions
use ActionDispatch::DebugExceptions
use ActionDispatch::Callbacks
use ActionDispatch::Cookies
use ActionDispatch::Session::RedisStore
use ActionDispatch::Flash
use Gitlab::Middleware::ReadOnly
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
use Rack::Cors
use Warden::Manager
use Rack::Attack
use ApolloUploadServer::Middleware
use BatchLoader::Middleware
use Gitlab::Middleware::CorrelationId
use Gitlab::EtagCaching::Middleware
use Gitlab::Middleware::Go
use Gitlab::Jira::Middleware
use Gitlab::RequestProfiler::Middleware
use Gitlab::Middleware::Multipart
use Gitlab::Metrics::RackMiddleware
use Gitlab::Middleware::RailsQueueDuration
use OmniAuth::Strategies::GoogleOauth2
use OmniAuth::Strategies::Twitter
use OmniAuth::Strategies::GitHub
use OmniAuth::Strategies::Bitbucket
use OmniAuth::Strategies::GroupSaml
use OmniAuth::Strategies::Salesforce
run Gitlab::Application.routes