Page MenuHomePhabricator

Evaluate persistent connections from HTTP contexts
Closed, ResolvedPublic

Description

Currently, Phabricator opens a new connection per logical database. We could open fewer; T11044 is the pathway forward for that.

These connections survive for only a single request -- we don't use the "persistent connection" options available to us. Normally this is fine, but in high load cases this can result in high connection turnover and exhaustion of outbound ports since they're consumed for 60 seconds after closing (see previous discussion in T11458).

Fixing this may be as simple as using persistent connections. However, we first need to make sure that the semantics on persistent connections don't deviate from the semantics we expect. In particular, the same request should never get the same connection twice. Although it's likely that these are already the semantics, we should verify that things actually work like this.

Event Timeline

I've banged on this a reasonable amount locally without issues and the originating instance reports that this seems to have calmed things down in production with these patches, so it seems like this pretty much just worked.

I'm still a little suspicious that we haven't heard the last of this change, but hopefully any issues it does cause are reasonably easy to identify and diagnose and not spooky ghost hunts.

eadler added a project: Restricted Project.Sep 29 2016, 6:29 PM