Manual:$wgMaxShellWallClockTime

Maximum wall clock time (i.e. real time, of the kind the clock on the wall would measure) in seconds for shell processes under Linux.

See also:

$wgShellCgroup