Page MenuHomePhabricator

When we purge the request cache, also force PHP to collect cycles
ClosedPublic

Authored by epriestley on Sep 28 2017, 6:42 PM.
Tags
None
Referenced Files
F18791887: D18657.diff
Thu, Oct 16, 6:33 PM
F18627860: D18657.id.diff
Sep 16 2025, 4:57 AM
F18624078: D18657.diff
Sep 15 2025, 6:37 PM
F18103670: D18657.id.diff
Aug 10 2025, 7:15 AM
F18102306: D18657.diff
Aug 9 2025, 7:56 PM
F17832989: D18657.id44798.diff
Jul 26 2025, 1:13 PM
F17829866: D18657.diff
Jul 26 2025, 10:26 AM
F17826345: D18657.id44793.diff
Jul 26 2025, 7:12 AM
Subscribers
None

Details

Summary

Ref T12997. See that task for more details. Briefly, an unusual dataset (where commits are mentioned hundreds of times by other commits) is causing some weird memory behavior in the daemons.

Forcing PHP to GC cycles explicitly after each task completes seems to help with this, by cleaning up some of the memory between tasks. A more thorough fix might be to untangle the $xactions structure, but that's significantly more involved.

Test Plan
  • Did this locally in a controlled environment, saw an immediate collection of a 500MB $xactions cycle.
  • Put a similar change in production, memory usage seemed less to improve. It's hard to tell for sure that this does anything, but it shouldn't hurt.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable