gitlab-rails console is slow to connect to pgbouncer
I noticed while attempting to run gitlab-rails c on web-cny-01-sv-gprd.c.gitlab-production.internal that it was taking a long time. It looks like perhaps connectiing to the database is slow. I keep seeing these system calls:
setsockopt(6, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(6432), sin_addr=inet_addr("10.220.16.2")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=6, events=POLLOUT|POLLERR}], 1, -1) = 1 ([{fd=6, revents=POLLOUT}])
getsockopt(6, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getsockname(6, {sa_family=AF_INET, sin_port=htons(33342), sin_addr=inet_addr("10.220.8.16")}, [16]) = 0
poll([{fd=6, events=POLLOUT|POLLERR}], 1, -1) = 1 ([{fd=6, revents=POLLOUT}])
sendto(6, "\0\0\0\10\4\322\26/", 8, MSG_NOSIGNAL, NULL, 0) = 8
poll([{fd=6, events=POLLIN|POLLERR}], 1, -1