Page MenuHomePhabricator

504 gateway timeout trying to transform Wikitext to lint errors
Open, MediumPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):
Send a POST request to https://www.wikidata.org/w/rest.php/v1/transform/wikitext/to/lint/User_talk:Daniel_Mietchen/Archive%2F2018
with the Wikitext present at https://www.wikidata.org/w/index.php?title=User_talk:Daniel_Mietchen/Archive/2018&oldid=1537339231.

What happens?:
A 504 gateway timeout error is thrown.

What should have happened instead?:
The lint errors present in the Wikitext should have been returned.

Event Timeline

Interestingly, I was able to get the correct output by specifying the revision directly, i.e.

curl -X 'POST' \
'https://www.wikidata.org/w/rest.php/v1/transform/wikitext/to/lint/User_talk%3ADaniel_Mietchen%2FArchive%2F2018/1537339231' \
-H 'accept: application/json' \
-H 'Accept-Language: en' \
-H 'Content-Type: application/json' \
-d '{}'

and that gave a proper response, which at least lets us know it's not the revision size (over 2M, quite large) or anything intrinsic to the wikitext.

That at least provides a workaround for now, though MediaWiki should not fail in this fashion.

Hi, I'm interested in investigating T440792. I noticed the request succeeds when an explicit revision ID is provided but fails otherwise. I'd like to compare the execution paths in TransformHandler and check for revision lookup or timeout issues in a local dev environment. Please let me know if there are existing findings or patches I should be aware of.

Hi, I'm interested in investigating T440792. I noticed the request succeeds when an explicit revision ID is provided but fails otherwise. I'd like to compare the execution paths in TransformHandler and check for revision lookup or timeout issues in a local dev environment. Please let me know if there are existing findings or patches I should be aware of.

Investigation and patches are always welcome.
If by some chance the comment I'm responding to was generated by an AI agent, please be aware that humans read and respond to these bug reports and to additional comments made on them, and in my particular case, I would prefer that disclosure is made that I am conversing with an AI agent rather than a person. If not, then I apologize in advance, and carry on.

Interestingly, I was able to get the correct output by specifying the revision directly...

Thanks, I didn't know that was possible.

and that gave a proper response, which at least lets us know it's not the revision size (over 2M, quite large) or anything intrinsic to the wikitext.

That at least provides a workaround for now, though MediaWiki should not fail in this fashion.

Well, I just tried the request I mentioned in the description and it succeeded this time. But if it happens again, I would not be able to work around it by specifying a revision in all cases though. My bot needs to access the transformation endpoints up to 4 times for each page it tries to edit, twice with the Wikitext found in the latest (at the time of it starting to work on that page) revision and twice with Wikitext it generated, so the requests can still fail half the time with this approach.

Well, I just tried the request I mentioned in the description and it succeeded this time...

Seems like I spoke too soon; the error is back. Is there some sort of cache that I could have been served from previously?

Please forgive me; since my proficiency in English is limited, I have to use artificial intelligence (AI) for the translation.

Redmin renamed this task from 504 bad gateway trying to transform Wikitext to lint errors to 504 gateway timeout trying to transform Wikitext to lint errors.Sun, Nov 8, 12:10 PM
Redmin updated the task description. (Show Details)