Cscott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/167870

Change subject: Limit execution time to 1 hour (which should be very generous).
......................................................................

Limit execution time to 1 hour (which should be very generous).

Change-Id: I6d3e6fd6d5735a5e41964b2cc0c1c3e091067762
---
M LocalSettings.js
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ocg-collection 
refs/changes/70/167870/1

diff --git a/LocalSettings.js b/LocalSettings.js
index d173b39..febffd0 100644
--- a/LocalSettings.js
+++ b/LocalSettings.js
@@ -13,6 +13,12 @@
        // DoS prevention: limit bundle sizes to 512MB
        
config.backend.bundler.additionalArgs.push('--image-size-limit=500000000');
        
config.backend.bundler.additionalArgs.push('--bundle-size-limit=536870912');
+       // DoS prevention: limit job CPU time to 1hr.
+       var CPU_LIMIT_SECS = 60 * 60 /* 1 hour, in seconds */;
+       config.backend.bundler.max_execution_time = CPU_LIMIT_SECS;
+       Object.keys(config.backend.writers).forEach(function(w) {
+               config.backend.writers[w].max_execution_time = CPU_LIMIT_SECS;
+       });
 
        config.logging["winston/transports/Console"] = { level: "debug" };
        config.logging["winston-posix-syslog/PosixSyslog"] = { level: "debug" };

-- 
To view, visit https://gerrit.wikimedia.org/r/167870
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d3e6fd6d5735a5e41964b2cc0c1c3e091067762
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Cscott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to