Page MenuHomePhabricator

High rate of 412 responses from Parsoid-PHP
Closed, ResolvedPublic

Description

After we started mirroring the traffic to parsoid-php, we've observed a high number of 412 responses from Parsoid.

Parsoid codebase never returns 412, however core REST framework does. We need to investigate why the 412s are returned.

Event Timeline

Pchelolo created this task.Tue, Oct 29, 7:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptTue, Oct 29, 7:30 PM
ssastry triaged this task as Normal priority.Tue, Oct 29, 8:58 PM
ssastry moved this task from Backlog to Bugs on the Parsoid-PHP board.

https://github.com/wikimedia/mediawiki/blob/master/includes/Rest/ConditionalHeaderUtil.php#L43-L96 is the code in the REST framework that returns a http 412. Glancing at that code, that indicates potentially issues in request tags (etag, if-modified-since .. )

@Pchelolo Likely an issue with RESTBase requests.

Mentioned in SAL (#wikimedia-operations) [2019-10-30T21:17:36Z] <ppchelko@deploy1001> Started deploy [restbase/deploy@88cf547]: Parsoid mirroring followups: T236837, T236838

Mentioned in SAL (#wikimedia-operations) [2019-10-30T21:31:40Z] <ppchelko@deploy1001> Finished deploy [restbase/deploy@88cf547]: Parsoid mirroring followups: T236837, T236838 (duration: 14m 04s)

Ok, I know what's happening now. RESTBase is passing through the if-unmodified-since header to parsoid-php. With current implementation MediaWiki responds with 412 for any valid if-unmodified-since request, which is technically correct - we don't cache parsoid results in core. Fixing.

Mentioned in SAL (#wikimedia-operations) [2019-10-30T21:55:05Z] <ppchelko@deploy1001> Started deploy [restbase/deploy@fa934c8]: Bump parsoid mirroring to 25% and fix 412: T235902, T236837

Mentioned in SAL (#wikimedia-operations) [2019-10-30T22:08:59Z] <ppchelko@deploy1001> Finished deploy [restbase/deploy@fa934c8]: Bump parsoid mirroring to 25% and fix 412: T235902, T236837 (duration: 13m 54s)

Seem to have been fixed by my latest deployment. Resolving.

Pchelolo closed this task as Resolved.Wed, Oct 30, 10:11 PM
Pchelolo claimed this task.