Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts/travis-ci: bump apt timeout in before_install.bash. #3313

Merged
merged 1 commit into from Jan 20, 2018

Conversation

mkrautz
Copy link
Contributor

@mkrautz mkrautz commented Jan 20, 2018

After switching to using a mirror of MXE on dl.mumble.info we've begun
running into timeouts from apt on Travis CI. For example:

E: Failed to fetch https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt/debian/pool/main/m/mxe-x86-64-unknown-linux-gnu-cmake/mxe-x86-64-unknown-linux-gnu-cmake_3.5.2-20170208_amd64.deb  Operation too slow. Less than 10 bytes/sec transferred the last 10 seconds

The error is from cURL, and it means that the options CURLOPT_LOW_SPEED_LIMIT
and CURLOPT_LOW_SPEED_TIME are set quite low.
(See https://github.com/curl/curl/blob/bb0ffcc36fd46298e02f943b255ee5d6553c06dc/lib/speedcheck.c)

To fix this, we set the Acquire::http::Timeout option to 120 seconds.
This causes apt's https transport to set CURLOPT_LOW_SPEED_TIME to 120.
(See https://github.com/Debian/apt/blob/debian/wheezy/methods/https.cc#L224-L230)

Fixes #3312

After switching to using a mirror of MXE on dl.mumble.info we've begun
running into timeouts from apt on Travis CI. For example:

	E: Failed to fetch https://dl.mumble.info/mirror/pkg.mxe.cc/repos/apt/debian/pool/main/m/mxe-x86-64-unknown-linux-gnu-cmake/mxe-x86-64-unknown-linux-gnu-cmake_3.5.2-20170208_amd64.deb  Operation too slow. Less than 10 bytes/sec transferred the last 10 seconds

The error is from cURL, and it means that the options CURLOPT_LOW_SPEED_LIMIT
and CURLOPT_LOW_SPEED_TIME are set quite low.
(See https://github.com/curl/curl/blob/bb0ffcc36fd46298e02f943b255ee5d6553c06dc/lib/speedcheck.c)

To fix this, we set the Acquire::http::Timeout option to 120 seconds.
This causes apt's https transport to set CURLOPT_LOW_SPEED_TIME to 120.
(See https://github.com/Debian/apt/blob/debian/wheezy/methods/https.cc#L224-L230)

Fixes mumble-voip#3312
Copy link
Member

@Kissaki Kissaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems plausible
LGTM

@@ -8,6 +8,13 @@
MUMBLE_HOST_DEB=${MUMBLE_HOST/_/-}

if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
# Bump the apt http timeout to 120 seconds.
# Without this, we'd regularly get timeout errors
# from our MXE mirror on dl.mumble.info.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*when downloading MXE from our mirror at dl.mumble.info.

it's not our mirror that causes the error

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. OK. Maybe I should've elaborated.

I think the error happens because for Fastly to serve a file, unless you've got "streaming" enabled, it'll wait serving any bytes until the file is fully downloaded to the Fastly node.

(See https://docs.fastly.com/guides/performance-tuning/improving-caching-performance-with-large-files)

Obviously, such a scenario would trigger the error messages we've been getting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose I should mention this in the code? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided to leave the message as-is, and referenced my comment here from the issue.
Thanks for the review.

@mkrautz mkrautz merged commit 71ab5b0 into mumble-voip:master Jan 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ubuntu trusty Travis-CI builds fail with "operation too slow" download error.
2 participants