[Tex/LaTex] Why is tlmgr so slow

installinglinuxsharelatextexlive

I would like to install extra packages in the ShareLatex 0.2.0 Docker image, but it have a 2016 tlmgr and a 2015 texlive, so not optimal.

When I do the following

tlmgr option repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final
tlmgr install ms
tlmgr install ...

installing each package takes ~5 minutes each, where I have a feeling that there is a sleep command somewhere. Below is the output from the first installed package.

Question

Does anyone know how to speed this up?

tlmgr: setting default package repository to ftp://tug.org/historic/systems/texlive/2015/tlnet-final
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/tlpkg/texlive.tlpdb.xz
TeX Live 2015 is frozen forever and will no
longer be updated.  This happens in preparation for a new release.

If you're interested in helping to pretest the new release (when
pretests are available), please read http://tug.org/texlive/pretest.html.
Otherwise, just wait, and the new release will be ready in due time.
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.tar.xz
TLUtils::download_file: retrying with wget.
tlmgr: package repository ftp://tug.org/historic/systems/texlive/2015/tlnet-final
[1/1, ??:??/??:??] install: ms [2054k]
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.tar.xz
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz
Useless content call in void context at /usr/share/perl5/LWP/Protocol/ftp.pm line 379.
TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.doc.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.doc.tar.xz
TLUtils::download_file: retrying with wget.
TLUtils::download_file: retry with wget succeeded: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.doc.tar.xz
tlmgr: package log updated: /usr/local/texlive/2015/texmf-var/web2c/tlmgr.log
running mktexlsr ...
done running mktexlsr.

Best Answer

The reason is that for each package there is first a try via ftp and LWP that fails, see:

TLDownload::get_file: response error: 400 FTP return code 000 (for ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz)
TLUtils::download_file: persistent connection ok, but download failed: ftp://tug.org/historic/systems/texlive/2015/tlnet-final/archive/ms.source.tar.xz
TLUtils::download_file: retrying with wget.

The wget then works immediately. To prohibit LWP usage you can pass the option --no-persistent-downloads to tlmgr, or set it in the config file of tlmgr.

Related Question