Am 28.11.2013 15:22, schrieb zhaopuming:

I try to download the new version of dub and vibe.d from code.dlang.org, as well as vibed.org, all of them behave weird, the download abruptly breaks at a random point EVERY time wget retries to download it. Is it a network problem, or does anyone else have the same situation?

I was able isolate the cause now and enabled a workaround for the two
sites, so downloads should work again, unless the connection is very
slow (download takes more than an hour).

It's currently still very unclear why that issue occurs now and not
right from the beginning, but what's clear so far is that this happens:

On the server, there is a reverse proxy and a separate process for each
site. When the site process now writes the response containing the
downloaded file, the whole file seems to be buffered somewhere and the
request is handled almost immediately. The site process in turn starts
waiting for the next request and times out after the keep alive timeout
(was 10 seconds). However, the reverse proxy is still forwarding data
from the socket of the site process to the socket of the requesting
client. Once the timeout happens, the site process terminates the
connection and the reverse proxy cannot read the rest of the data in the
buffer anymore.

What's still unclear is where that buffer is and how to wait for it to
be flushed. The workaround now was to increase the keep alive timeout to
an hour.