Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/163078
Change subject: Make scap restart HHVM
......................................................................
Make scap restart HHVM
If we keep syncing new code without restarting HHVM, HHVM's JIT and PCRE caches
will eventually run out of space, leading HHVM to skip certain optimizations
and eventually crash. To mitigate that, restart the HHVM service when scap is
done. Depends on change I60115d46a in operations/puppet.
Change-Id: Idc01b17ca52922cc71c5e04260c3c098317f6496
---
M scap/main.py
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/scap
refs/changes/78/163078/1
diff --git a/scap/main.py b/scap/main.py
index fec22fe..97ceb67 100644
--- a/scap/main.py
+++ b/scap/main.py
@@ -242,6 +242,16 @@
'%d hosts had sync_wikiversions errors', failed)
self.soft_errors = True
+ # Restart HHVM to reset the JIT cache.
+ restart_hhvm = ssh.Job(self._get_apache_list())
+ restart_hhvm.shuffle()
+ restart_hhvm.command('sudo /sbin/restart hhvm')
+ succeeded, failed = restart_hhvm.run()
+ if failed:
+ self.get_logger().warning(
+ 'failed to restart HHVM on %d hosts', failed)
+ self.soft_errors = True
+
def _after_lock_release(self):
self.announce('Finished scap: %s (duration: %s)',
self.arguments.message, utils.human_duration(self.get_duration()))
--
To view, visit https://gerrit.wikimedia.org/r/163078
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc01b17ca52922cc71c5e04260c3c098317f6496
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits