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

Add a timeout for elpa repositories when downloading packages #3284

Closed
robbyoconnor opened this issue Oct 7, 2015 · 6 comments
Closed

Add a timeout for elpa repositories when downloading packages #3284

robbyoconnor opened this issue Oct 7, 2015 · 6 comments

Comments

@robbyoconnor
Copy link
Contributor

If one of the elpa repositories is down for any reason...bootstrapping, package updates and/or new package install fails.

Proposal: add a timeout -- and gracefully fail (if possible).

This issue is based on a discussion in #3270, specifically see #3270 (comment).

syl20bnr added a commit that referenced this issue Nov 30, 2015
New file core-emacs-ext.el
This is a basic monkey-patch solution but it will do the job for now.
The timeout amount is not configurable for now.

Tested on 24.5 and 24.3.1

fixes #3284
@syl20bnr
Copy link
Owner

We should now have a basic timeout of 5 seconds when fetching the elpa archives.

d12frosted pushed a commit to d12frosted/spacemacs that referenced this issue Nov 30, 2015
New file core-emacs-ext.el
This is a basic monkey-patch solution but it will do the job for now.
The timeout amount is not configurable for now.

Tested on 24.5 and 24.3.1

fixes syl20bnr#3284
@Malabarba
Copy link

As someone who would like to improve package.el itself, could I ask for more information on this?
What exactly happens for you when an archive is down?
Is it that Emacs hangs indefinitely while trying to update? Or is it that the error message is uninformative?

d1egoaz pushed a commit to d1egoaz/spacemacs that referenced this issue Feb 6, 2016
New file core-emacs-ext.el
This is a basic monkey-patch solution but it will do the job for now.
The timeout amount is not configurable for now.

Tested on 24.5 and 24.3.1

fixes syl20bnr#3284
@mb-dev
Copy link

mb-dev commented Feb 19, 2016

This is still not fixed. Elpa is down at the moment and when spacemacs load I get this error:

Warning (initialization): An error occurred while loading ‘/Users/moshe/.emacs.d/init.el’:

error: Could not create connection to elpa.gnu.org:443

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

Afterwards, spacemacs fails to load, syntax highlighting gets turned off, and i'm back to emacs shortcuts.

screen shot 2016-02-19 at 11 32 57 am

@syl20bnr
Copy link
Owner

@mb-dev this is fixed in 0.105.11 :-)

@syl20bnr
Copy link
Owner

@Malabarba Sorry for the late reply, Emacs starts normally, the issue was the default time of the duration out which seems hard coded and not available to the end user. If I recall correctly the time out was something like 90sec. or 120sec. What I did in Spacemacs is a pre-step to GET the repo URL with a with-time-out and I mark the not unavailable archives.

@mb-dev
Copy link

mb-dev commented Feb 22, 2016

Great @syl20bnr! thanks for fixing it. Spacemacs is becoming my favorite editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants