HomePhabricator

(stable) When we purge the request cache, also force PHP to collect cycles

Description

(stable) When we purge the request cache, also force PHP to collect cycles

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.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T12997

Differential Revision: https://secure.phabricator.com/D18657

Details

Provenance
epriestleyAuthored on Sep 28 2017, 6:37 PM
epriestleyPushed on Sep 28 2017, 7:37 PM
Reviewer
amckinley
Differential Revision
D18657: When we purge the request cache, also force PHP to collect cycles
Parents
rPc034306320b5: (stable) Improve performance of Ferret engine ngram extraction, particularly…
Branches
Unknown
Tags
Unknown
Tasks
Unknown Object (Maniphest Task)
Build Status
Buildable 18580
Build 25026: Run Core Tests