Do not limit filesize when running a maintenance script
authorTim Starling <tstarling@wikimedia.org>
Tue, 14 Nov 2017 09:33:46 +0000 (20:33 +1100)
committerTim Starling <tstarling@wikimedia.org>
Tue, 14 Nov 2017 09:45:24 +0000 (20:45 +1100)
Starting HHVM may require writing very large files, so it can't have the
same file size limit as image scaling etc. The memory limit was already
disabled for much the same reason.

This is the only caller of wfShellWikiCmd() in core which proceeds to
call wfShellExec().

Bug: T145819
Change-Id: I1ab35edbbdb63c2d6f5f578cba2547be79a965ef

includes/SiteConfiguration.php

index 7a01a65..2d1d961 100644 (file)
@@ -556,7 +556,7 @@ class SiteConfiguration {
                                ]
                        );
                        // ulimit5.sh breaks this call
-                       $data = trim( wfShellExec( $cmd, $retVal, [], [ 'memory' => 0 ] ) );
+                       $data = trim( wfShellExec( $cmd, $retVal, [], [ 'memory' => 0, 'filesize' => 0 ] ) );
                        if ( $retVal != 0 || !strlen( $data ) ) {
                                throw new MWException( "Failed to run getConfiguration.php." );
                        }