Large gzip-encoded Conduit requests fail: PHP "max_input_vars" warning is emitted in place of the JSON response
Categories
(Conduit :: Phabricator, defect)
Tracking
(Not tracked)
People
(Reporter: tjr, Unassigned)
References
Details
(Keywords: regression)
Since around Oct 22, 2026, large differential.creatediff calls made with arc diff fail on both phabricator.services.mozilla.com and phabricator-dev.allizom.org. The response is HTTP 200
with this body instead of JSON:
<br />
<b>Warning</b>: PHP Request Startup: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in <b>Unknown</b> on line <b>0</b><br />
arc then reports Host returned HTTP/200, but invalid JSON data in response to a Conduit method call and gives up.
Cause:
- Phabricator advertises X-Conduit-Capabilities: gzip, so arcanist gzips its request bodies. It sends them with Content-Encoding: gzip and Content-Type: application/x-www-form-urlencoded.
- PHP (the server reports PHP/8.4.27) parses the compressed body as form data during request startup, before Phabricator decompresses it.
- Compressed data contains the byte & (0x26) about once every 256 bytes, and PHP treats each one as a form-variable separator. A gzipped body larger than roughly 250 KB therefore goes
over max_input_vars (1000). - PHP prints the resulting warning into the response, so the Conduit JSON can't be parsed.
The uncompressed request only has three real fields (params, output, conduit).
Impact:
- Updatebot: every PDF.js update since Oct 26 has failed to reach Phabricator. PDF.js's diff is about 9 MB, or about 1.1 MB gzipped. Uploads of the same size worked until Oct 21. Before
Oct 26 the failures were masked by a separate IP block. - Anyone else: this presumably affects any arc user submitting a large diff, not just Updatebot.
Steps to reproduce (verified against phabricator-dev.allizom.org on 2026-10-28):
- Build a differential.creatediff request whose urlencoded body is a few MB. I used today's PDF.js update, which is about 9.0 MB urlencoded.
- gzip it the way arcanist does. In my test that gave a 1,181,710-byte body containing 4,621 0x26 bytes.
- POST it with Content-Type: application/x-www-form-urlencoded and Content-Encoding: gzip to /api/differential.creatediff.
- The response is HTTP 200 with the warning above and no JSON.
The same request sent without gzip succeeds. It returns a normal {"result":{"diffid":…}} with HTTP/1.1 or HTTP/2, with or without Expect: 100-continue.
Comment 1•24 days ago
|
||
Maybe a regression from bug 2084642.
| Reporter | ||
Comment 2•24 days ago
|
||
So claude is suggesting that the problem is that display_startup_errors=On or maybe display_errors=On is the issue, and if that was switched off it would work again.
The same problem might have been occuring in PHP 7, just not visible, if you have error logs you could look.
From what I'm seeing the options are:
- stop showing warnings, but you'll get them in the logs
- bump
max_input_varsbut you'll get the error still, just less frequently, because a gzip body has lots of unintentional & - Set
enable_post_data_reading=Offand phabricator, I think, parses the request itself, it doesn't need PHP to do it for you, but you'd want to check phabricator's documentation to confirm this is safe and test it...
| Reporter | ||
Updated•23 days ago
|
Description
•