Commit e73dd869 authored by Thong Kuah's avatar Thong Kuah

Create new set of LB hosts on worker boot

As Rails 6.1 has automatic discard for all AR connection pools, we
need to create new connection pools.

https://gitlab.com/gitlab-org/gitlab/-/issues/332913
parent b9593cda
......@@ -11,6 +11,9 @@ if Gitlab::Database::LoadBalancing.enable?
# This needs to be executed after fork of clustered processes
Gitlab::Cluster::LifecycleEvents.on_worker_start do
# For Host-based LB, we need to re-connect as Rails discards connections on fork
Gitlab::Database::LoadBalancing.configure_proxy
# Service discovery must be started after configuring the proxy, as service
# discovery depends on this.
Gitlab::Database::LoadBalancing.start_service_discovery
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment