Topic on Talk:VisualEditor

Parsoid crashes when processing articles with codeblocks

7
Summary by SSastry (WMF)
Satttarov (talkcontribs)

Hello, folks! When I create an article in our private wiki with more then four codeblocks, save it and try to edit later, those codeblocks aren't appear in editor. And when I close the editor, page freezes for about a minute then pass. But if I try to launch editor on this page again it crashes with error "HTTP 0" on parsoid logs I see this:

[warning][testwiki/Тестовая_страница] non-200 response: 504 <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>
[error][testwiki/Тестовая_страница] Batch request failure for "f1c423e85011b3500256b9b5e736d7a0": 504
Error: Batch request failure for "f1c423e85011b3500256b9b5e736d7a0": 504
at BatchRequest.ApiRequest._requestCB (/usr/lib/parsoid/src/lib/mw/ApiRequest.js:421:11)
at Request.self.callback (/usr/lib/parsoid/node_modules/request/request.js:198:22)
at Request.emit (events.js:98:17)
at Request.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1063:14)
at Request.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/usr/lib/parsoid/node_modules/request/request.js:1009:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:929:16
at process._tickCallback (node.js:419:13)
[warning][testwiki/Тестовая_страница] non-200 response: 504 <html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>

Somebody encountered the same problem? Please help, this error completely defeats the purpose of our wiki.

Whatamidoing (WMF) (talkcontribs)
SSastry (WMF) (talkcontribs)

I haven't seen this before ... but, can you paste the contents of that page for us to inspect? Looks like mediawiki is not able to provide information back to Parsoid ... either it is taking too long and timing out, or there is some other error that is causing this on the mediawiki end.

Satttarov (talkcontribs)

For the sake of testing I'm using these blocks. It doesn't matter what those blocks contain, if there is more than four blocks, Parsoid hangs as I described before.

<syntaxhighlight lang="bash">

test

</syntaxhighlight>

Thanks in advance.

Arlolra (talkcontribs)

At first glance, that looks like a deadlock.

Do things get worse when you remove batching?

parsoidConfig.useBatchAPI = false;

Is this specific to the syntaxhighlight extension? What if you tried with <source>?

Arlolra (talkcontribs)

Sorry, <source> wasn't a good test case. I wanted an extension tag not provided by the same extension. Try <gallery>.

Arlolra (talkcontribs)