Page MenuHomePhabricator

Add Timeout to node -> mediawiki Requests
Closed, ResolvedPublic3 Story Points

Description

Lets configure our axios instance with a timeout. This should help reduce the risk of our service keeping growing connection count and then falling over.

This should not be shorter than the mediawiki -> node request, configured in T215912, so that we don't end too early.

Could also be related to: T217035

Note:
The timeout for the mediawiki->node request before T215912 is the default given by: $wgHTTPTimeout which is 25s.

Technical notes:

  • this should configure only the server-side http requests (not the client)
  • should be configurable via .env; falls back to a default if not configured
  • see https://github.com/axios/axios#axioscreateconfig for axios timeout configuration
  • should be set to the same default as the mediawiki -> node request timeout (3s)

Event Timeline

Tarrow created this task.Mar 12 2019, 9:52 AM
Tarrow updated the task description. (Show Details)Mar 12 2019, 12:58 PM
Pablo-WMDE updated the task description. (Show Details)Mar 12 2019, 1:14 PM
Lea_WMDE set the point value for this task to 3.Mar 13 2019, 3:30 PM
Lea_WMDE added a subscriber: Lea_WMDE.

It would probably make sense to have the same time out for both directions.

Addshore moved this task from incoming to in progress on the Wikidata board.Mar 25 2019, 4:05 PM
Jakob_WMDE updated the task description. (Show Details)Apr 23 2019, 11:13 AM

Change 506392 had a related patch set uploaded (by Matthias Geisler; owner: Matthias Geisler):
[wikibase/termbox@master] Introducing Timeout for server->MW requests

https://gerrit.wikimedia.org/r/506392

Change 506392 merged by jenkins-bot:
[wikibase/termbox@master] Introducing Timeout for server->MW requests

https://gerrit.wikimedia.org/r/506392

Pablo-WMDE moved this task from Peer Review to Done on the Wikidata-Termbox-Iteration-14 board.EditedMay 2 2019, 2:39 PM

Created https://gerrit.wikimedia.org/r/c/wikibase/termbox/+/507798 as tiny follow up to allow for timeout to be set to 0 (i.e. unlimited) via env.

Change 507798 had a related patch set uploaded (by Pablo Grass (WMDE); owner: Pablo Grass (WMDE)):
[wikibase/termbox@master] server: consolidate config validation

https://gerrit.wikimedia.org/r/507798

Change 507798 merged by jenkins-bot:
[wikibase/termbox@master] server: consolidate config validation

https://gerrit.wikimedia.org/r/507798

Jakob_WMDE closed this task as Resolved.Wed, May 22, 9:22 AM