Skip to content
代码片段 群组 项目
提交 e73dd869 编辑于 作者: 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
上级 b9593cda
No related branches found
No related tags found
无相关合并请求
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
# This needs to be executed after fork of clustered processes # This needs to be executed after fork of clustered processes
Gitlab::Cluster::LifecycleEvents.on_worker_start do 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 # Service discovery must be started after configuring the proxy, as service
# discovery depends on this. # discovery depends on this.
Gitlab::Database::LoadBalancing.start_service_discovery Gitlab::Database::LoadBalancing.start_service_discovery
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册