Cscott has submitted this change and it was merged.

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(-)

Approvals:
  Arlolra: Looks good to me, approved
  Cscott: Verified



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: merged
Gerrit-Change-Id: I6d3e6fd6d5735a5e41964b2cc0c1c3e091067762
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ocg-collection
Gerrit-Branch: wmf-deploy
Gerrit-Owner: Cscott <[email protected]>
Gerrit-Reviewer: Arlolra <[email protected]>
Gerrit-Reviewer: Cscott <[email protected]>

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

Reply via email to