Page MenuHomePhabricator

API : Service Unavailable error but page partially saved
Closed, InvalidPublic

Description

I'm seeing some non-frequent edits performed with API:Edit that return an error and still save the article, but without the end of the text.
I think this problem is only happening for a few months at most, isn't very frequent, and only happens on big enough articles.

I've been running a bot for several years on frWP and enWP, and I recently noticed that my bot was performing 2 edits instead of one in some situations (it's rather rare but it happens):

  • A first edit in which the end of the article was truncated
  • A second edit fixing the first edit

I managed to retrieve one such instance and the logs from my bot :

My logs (times are UTC+2) :

13:39:57.920 [Thread-5] INFO API - POST https://fr.wikipedia.org/w/api.php?summary=v2.04b - [[P:CS|Correction syntaxique]] (Argument non numérique de formatnum)&minor=&bot=&format=xml&starttimestamp=2021-04-27T11:39:57Z&title=Phase de groupes de la Ligue Europa 2019-2020&token=....&tags=WPCleaner&basetimestamp=2021-01-13T10:00:41Z&assert=user&action=edit&text={{Article général|Ligue Europa 2019-2020}}...&watchlist=nochange
13:40:56.143 [Thread-5] ERROR org.wikipediacleaner.api.impl.MediaWikiAPI - URL access returned Service Unavailable
13:41:26.150 [Thread-5] WARN org.wikipediacleaner.api.impl.MediaWikiAPI - Error. Trying again
13:41:26.150 [Thread-5] INFO API - POST https://fr.wikipedia.org/w/api.php?summary=v2.04b - [[P:CS|Correction syntaxique]] (Argument non numérique de formatnum)&minor=&bot=&format=xml&starttimestamp=2021-04-27T11:39:57Z&title=Phase de groupes de la Ligue Europa 2019-2020&token=...&tags=WPCleaner&basetimestamp=2021-01-13T10:00:41Z&assert=user&action=edit&text={{Article général|Ligue Europa 2019-2020}}...&watchlist=nochange

Other example but I don't have the logs:

There's also this report by a user that could be the same problem : https://en.wikipedia.org/wiki/Wikipedia_talk:WPCleaner#Odd_edit_by_WPCleaner


By running a query on enWP, I retrieved some other examples, which are all recent. Nothing before early March (I ran a lot of edits on 2021-04-20)

Older edits listed by the query are not showing this problem, so it seems to have started in early March or not long before


By running the same query on frWP, I see similar results. First problem on 2021-04-16, results returned before that day by the query are not showing the problem.

Event Timeline

NicoV added a subscriber: RG067.
NicoV updated the task description. (Show Details)

It looks like the data stream was interrupt and the server assumed a connection closed by the client.

Try to post the token as last parameter. There is no save without the token and it would be a way for the server to detect a canceled connection (by the server or the client).

When the server is assuming the connection is closed by the client and every data are there for the request to process, than the request is processed and the data is saved. Not sure why a 503 is in place here. No way for me to look into something.

Still assuming there is nothing todo on the server side/software side