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.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

epriestley added a revision: Restricted Differential Revision.Sep 20 2016, 2:29 PM
epriestley added a revision: Restricted Differential Revision.Sep 20 2016, 2:34 PM
epriestley added a commit: Restricted Diffusion Commit.Sep 21 2016, 9:46 PM
epriestley added a commit: Restricted Diffusion Commit.

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.

epriestley added a revision: Restricted Differential Revision.Sep 23 2016, 7:40 PM
epriestley added a commit: Restricted Diffusion Commit.Sep 23 2016, 7:42 PM
eadler added a project: Restricted Project.Sep 29 2016, 6:29 PM
epriestley added a revision: Restricted Differential Revision.Nov 22 2016, 2:41 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Nov 22 2016, 6:57 PM
epriestley added a commit: Restricted Diffusion Commit.