Manual:$wgMaxShellTime

Details
Under Linux, shell commands are executed with the time and memory limits given by $wgMaxShellTime and $wgMaxShellMemory. Setting either variable to 0 will disable both limits.