Page MenuHomePhabricator

"arc diff --update" fails with "502 Bad Gatway" on nginx if revision comment's first line is 256 chars or longer
Closed, DuplicatePublic


Update an existing Differential entry using "arc diff --update". When the editor opens, enter a revision comment whose first line is 256 characters or longer, save, and quit the editor. Arc diff then fails with an html error "502 Bad Gateway". Can we fix the failure or provide an actionable error message, like "line exceeds maximum length 255 characters"? Thanks.


% arc diff --update D1234 HEAD~

... (emacs opens; type 256 chars into first line) ...

No lint engine configured for this project.
Running unit tests...
No unit test engine is configured for this project.
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
(Run with `--trace` for a full exception trace.)

Phabricator is on web server "nginx/1.4.6 (Ubuntu)", according to arc's output. Other users in my group report that this problem does not exist with Apache. Not clear if this is a bug in nginx or Phabricator (maybe even fixed in more recent nginx?). Not sure how to get the Phabricator version, but here is the arc version:

% arc version
arcanist e79032fec289db9821e7f3c41694f6ae81b43562 (23 Mar 2015)
libphutil 3a06e1a0dda85e78c2ee70dd19417d2b5b60f1c1 (30 Mar 2015)

Local repository is git:

% git --version
git version 2.3.4 (Apple Git-56)

No such restriction in subsequent lines, only on the first line of the revision comment.
No such restriction in the original comment of a new diff, via "arc diff --create".