Page MenuHomePhabricator

Timeout in $wgVirtualRestConfig is ignored
Closed, ResolvedPublic


As mentioned in T279825#7151307, the timeout set in is ignored and falls back to $wgHTTPTimeout.

The passed in timeout gets properly set as the reqTimeout,

However, when VirtualRESTServiceClient->runMulti calls MultiHttpClient->runMulti,

it's only passing one argument but the reqTimeout is an option of the second parameter,

	 * @param array[] $reqs Map of HTTP request arrays
	 * @param array $opts Options
	 *   - connTimeout     : connection timeout per request (seconds)
	 *   - reqTimeout      : post-connection timeout per request (seconds)
	 *   - usePipelining   : whether to use HTTP pipelining if possible (for all hosts)
	 *   - maxConnsPerHost : maximum number of concurrent connections (per host)
	 * @return array[] $reqs With response array populated for each
	 * @throws Exception
	public function runMulti( array $reqs, array $opts = [] ) {

Keep in mind that, while this setting is necessary, there're also envoy timeouts to worry about in between the virtualrestclient and the service. See T285445