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.
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.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | ssastry | T229015 Tracking: Direct live production traffic at Parsoid/PHP | |||
Resolved | ssastry | T235902 Tracking: Shadow Parsoid/PHP deployment to production cluster to handle mirrored reparse traffic | |||
Resolved | • Pchelolo | T236837 High rate of 412 responses from Parsoid-PHP |
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 .. )
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)