Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/178794
Change subject: HHVM: on service stop, 1-in-10 odds to clear repo
......................................................................
HHVM: on service stop, 1-in-10 odds to clear repo
HHVM does not prune from its byte code repository code for files that have been
modified or removed. This is another case of HHVM's operational behavior being
tuned to RepoAuthoritative mode.
Some of the initial HHVM app servers are beginning to fill up /run because of
this bug. They have been up for >100 days, so if we assume that the rate at
which we push new PHP code stays more or less constant, we should plan to clear
the repo on each server at least once every that many days. But because a
server starting HHVM on an empty repo is likely to be very slow for the first
30s or so of operation, so we don't want to do it everywhere at once.
So, add a random chance for clearing the bytecode repo when the service is
stopped, on the assumption that HHVM is restarted at least once every 10 days
(probably a safe assumption -- we never stopped seeing sporadic faults with
Zend, and I doubt we'll stop seeing them with HHVM any time soon.
Change-Id: Iefdf6d7c96e98fecec7d32a53ff06ba0d9af1a62
---
M modules/hhvm/files/hhvm.conf
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/94/178794/1
diff --git a/modules/hhvm/files/hhvm.conf b/modules/hhvm/files/hhvm.conf
index 0e7378c..88372c9 100644
--- a/modules/hhvm/files/hhvm.conf
+++ b/modules/hhvm/files/hhvm.conf
@@ -59,6 +59,10 @@
# Append the current UTC date (in YYYYMMDD format) to the file
# name, so it doesn't get clobbered when the PID is recycled.
mv --backup "$TRACE" "${TRACE}.$(date -u +%Y%m%d)"
+
+ # One-in-ten chance to clear the bytecode repo, so it doesn't
+ # keep growing forever.
+ [ "$(shuf -i 1-10 -n 1)" == 10 ] && rm -f
"${HHVM_RUN_DIR:-/run/hhvm}/cache/"*
end script
# Don't limit the size of core dumps.
--
To view, visit https://gerrit.wikimedia.org/r/178794
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefdf6d7c96e98fecec7d32a53ff06ba0d9af1a62
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits