Closed Bug 1546698 Opened 5 years ago Closed 5 years ago

Content of text attachments sometimes truncated

Categories

(bugzilla.mozilla.org :: Infrastructure, defect, P2)

Production
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: alexical, Unassigned)

References

Details

Attachments

(2 files)

STR:

Expected results:

The file should always end with the three "Thread Exit" lines

Actual results:

The file occasionally ends in seemingly random places

See Also: → 1544298

Seems a variant of Bug 1538047, but the file in question is served as text/plain; charset=UTF-8. Maybe different.

Assignee: attach-and-request → nobody
Component: Attachments & Requests → General
Product: Bugzilla → bugzilla.mozilla.org
QA Contact: default-qa
See Also: → 1538047
Version: unspecified → Production

The encoding of this is screwy. I'm going to make this directly use the mojolicious APIs which should fix the problem

Assignee: nobody → dylan
Priority: -- → P1

This was fixed via an nginx configuration change, and it seems to have been a low-level kernel or network problem. The nginx fix is to enabling proxy buffering so that it is able to write the response fast enough to the ELB before the ELB "gets bored" and closes the connection.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

This is still happening to me.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

I bet the configuration on the nginx side got reverted.

The thing the buffers requests must be turned on in nginx, or else gzip must be disabled. Either one will work.

Assignee: dylan → nobody

So :ckolos can help configure nginx once again?

Component: General → Infrastructure
Flags: needinfo?(ckolos)
QA Contact: dylan

buffers are turned on.

grep proxy_buffer nginx_conf.erb 
    proxy_buffer_size 16k;
    proxy_buffers 4 16k;
        proxy_buffering on;
    proxy_buffer_size 16k;
    proxy_buffers 4 16k;
        proxy_buffering on;

:dylan, I seem to recall something about the proxy_http_version influencing this. It's currently set to 1.1; could that be the cause?

Flags: needinfo?(ckolos) → needinfo?(dylan)

http 1.1 is fine. I would suggest turning off gzip until you can switch to something that actually properly implements HTTP, since ELBs clearly do not. :-)

Flags: needinfo?(dylan)

well, a little less snarky. Basically this happens if you take too long writing chunked encoding to ELBs. Previously the buffering was enough of a speed gain to make that work, and I suspect now it's not. What the ELBs are supposed to do when not given a final chunk is to insert one themselves, but they're not doing this either. Note my chunky-dumps script (check slack history, it's on dockerhub) can help debug this a bit. nginx itself behaves fine, but the ELB "gets bored" and never sends the 0\r\n chunk

Priority: P1 → P2

:kohei, can you confirm that this is no longer an issue?

Flags: needinfo?(kohei.yoshino)

Yeah, I can normally load the attachments linked from the Comment 0 and Bug 1559970 as well as dylan’s 2 test attachments here. Seems solved.

Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Flags: needinfo?(kohei.yoshino)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: