Open Bug 2086874 Opened 25 days ago Updated 19 days ago

Large gzip-encoded Conduit requests fail: PHP "max_input_vars" warning is emitted in place of the JSON response

Categories

(Conduit :: Phabricator, defect)

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:

  1. 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.
  2. PHP (the server reports PHP/8.4.27) parses the compressed body as form data during request startup, before Phabricator decompresses it.
  3. 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).
  4. 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):

  1. 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.
  2. gzip it the way arcanist does. In my test that gave a 1,181,710-byte body containing 4,621 0x26 bytes.
  3. POST it with Content-Type: application/x-www-form-urlencoded and Content-Encoding: gzip to /api/differential.creatediff.
  4. 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.

Maybe a regression from bug 2084642.

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:

  1. stop showing warnings, but you'll get them in the logs
  2. bump max_input_vars but you'll get the error still, just less frequently, because a gzip body has lots of unintentional &
  3. Set enable_post_data_reading=Off and 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...
Keywords: regression
Duplicate of this bug: 2087363
You need to log in before you can comment on or make changes to this bug.