Bug #81861 Installation with MySQL APT Repository causing slow APT UPDATE
Submitted: 15 Jun 2016 10:33 Modified: 20 Jun 2016 7:00
Reporter: Lucas Chigami Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Package Repos Severity:S3 (Non-critical)
Version:5.7 OS:Ubuntu (elementaryOS 0.3.2)
Assigned to: CPU Architecture:Any
Tags: 404, apt, installation, slow

[15 Jun 2016 10:33] Lucas Chigami
Description:
Installing MySQL using the package mysql-apt-config_0.7.3-1_all.deb causing slow apt-get update due to several HTTP/1.1 404 Not Found error for http://repo.mysql.com

Example of apt output

100% [Waiting for headers]                                         29,5 MB/s 0sHTTP/1.1 404 Not Found
Server: Apache
Content-Type: text/html; charset=iso-8859-1
Content-Length: 16
Date: Wed, 15 Jun 2016 10:15:44 GMT
Connection: keep-alive

GET /apt/ubuntu/dists/trusty/mysql-5.7/i18n/Translation-en.lzma HTTP/1.1
Host: repo.mysql.com
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (1.0.1ubuntu2)

100% [Waiting for headers]                                          196 kB/s 0sHTTP/1.1 404 Not Found
Server: Apache
Content-Type: text/html; charset=iso-8859-1
Content-Length: 16
Date: Wed, 15 Jun 2016 10:15:46 GMT
Connection: keep-alive

GET /apt/ubuntu/dists/trusty/mysql-5.7/i18n/Translation-en_US.gz HTTP/1.1
Host: repo.mysql.com
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (1.0.1ubuntu2)

100% [Waiting for headers]                                          196 kB/s 0sHTTP/1.1 404 Not Found
Server: Apache
Content-Length: 16
Date: Wed, 15 Jun 2016 10:15:48 GMT
Connection: keep-alive
Content-Type: application/x-gzip

GET /apt/ubuntu/dists/trusty/mysql-5.7/i18n/Translation-en.gz HTTP/1.1
Host: repo.mysql.com
Cache-Control: max-age=0
User-Agent: Debian APT-HTTP/1.3 (1.0.1ubuntu2)

100% [Waiting for headers]                                          196 kB/s 0sHTTP/1.1 404 Not Found
Server: Apache
Content-Length: 16
Date: Wed, 15 Jun 2016 10:15:50 GMT
Connection: keep-alive
Content-Type: application/x-gzip

GET /apt/ubuntu/dists/trusty/mysql-5.7/i18n/Translation-en_US HTTP/1.1
Host: repo.mysql.com
Cache-Control: max-age=0
Accept: text/*
User-Agent: Debian APT-HTTP/1.3 (1.0.1ubuntu2)

100% [Waiting for headers]                                          196 kB/s 0sHTTP/1.1 404 Not Found
Server: Apache
Content-Type: text/html; charset=iso-8859-1
Content-Length: 16
Date: Wed, 15 Jun 2016 10:15:51 GMT
Connection: keep-alive

Ign http://repo.mysql.com trusty/mysql-5.7 Translation-en_US                   
100% [Working]                                                      196 kB/s 0sGET /apt/ubuntu/dists/trusty/mysql-5.7/i18n/Translation-en HTTP/1.1
Host: repo.mysql.com
Cache-Control: max-age=0
Accept: text/*
User-Agent: Debian APT-HTTP/1.3 (1.0.1ubuntu2)

100% [Waiting for headers]HTTP/1.1 404 Not Found                               
Server: Apache
Content-Type: text/html; charset=iso-8859-1
Content-Length: 16
Date: Wed, 15 Jun 2016 10:15:52 GMT
Connection: keep-alive

Ign http://repo.mysql.com trusty/mysql-5.7 Translation-en
Fetched 34,1 kB in 18s (1.817 B/s)
Reading package lists... Done

How to repeat:
Install MySQL using the .DEB package and issue a 
"apt-get -o Debug::Acquire::http=true update" command.

Using Ubuntu 14.04 x64 based distro (ElementaryOS 0.3.2 Freya).

Suggested fix:
Fix the repository paths.
[16 Jun 2016 9:08] MySQL Verification Team
Hello Lucas Chigami,

Thank you for the report and feedback.
Observed many 'Not Found' issues.

Thanks,
Umesh
[16 Jun 2016 11:02] Lars Tangvald
Posted by developer:
 
Hi,

The issue here is simply that we don't offer the translations, which apt will generally try to request regardless. So unfortunately not a quick or simple fix.

However, actually having the translation files wouldn't be any faster, since a 404 won't be any slower than return actual content.
[16 Jun 2016 11:14] Lars Tangvald
Posted by developer:
 
To test, can you try appending -o Acquire::Languages="none" to the command and see if it works better?
[16 Jun 2016 11:21] Lucas Chigami
Hi,

Just as recommended, I added the following line at /etc/apt/apt.conf.d/00aptitude:

Acquire::Languages "none";

Issued the update command, and it's working fast.

Thanks for the suggestion.
[20 Jun 2016 7:00] Lars Tangvald
Posted by developer:
 
Good to hear. Note that this will mean apt will no longer try to fetch any translation files, so might not be ideal for a global config.

Closing the issue since it's more a side effect of apt default behavior than a bug.