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

"nix upgrade-nix" sometimes fails with GitHub 429 "Too Many Requests" error #12419

Open
2 tasks done
the-sun-will-rise-tomorrow opened this issue Feb 4, 2025 · 2 comments
Open
2 tasks done
Labels

Comments

@the-sun-will-rise-tomorrow
Copy link
Contributor

the-sun-will-rise-tomorrow commented Feb 4, 2025

Describe the bug

It looks like GitHub is not happy about Nix querying the raw nix-fallback-paths.nix file.

When I try to access that file (whether by running nix upgrade-nix, or from a web browser logged in to GitHub), I sometimes get a 429 "Too Many Requests" error.

Here's what it looks like when nix upgrade-nix fails due to this problem:

root@debian:~# nix upgrade-nix
warning: the group 'nixbld' specified in 'build-users-group' does not exist
warning: error: unable to download 'https://github.com/NixOS/nixpkgs/raw/master/nixos/modules/installer/tools/nix-fallback-paths.nix': HTTP error 429

       response body:

       429: Too Many Requests; retrying in 268 ms
error: syntax error, unexpected invalid token

       at «string»:1:1:

            1| 
             | ^

root@debian:~# 

Even though the error message says it will retry, it doesn't seem to actually retry. For comparison, here is what a successful execution looks like:

root@debian:~#  nix upgrade-nix
warning: the group 'nixbld' specified in 'build-users-group' does not exist
[0.0 MiB DL] verifying that '/nix/store/kwck2vdfdp2v4jr9c4daryyk9mlbx406-nix-2.24.12' works...warning: the group 'nixbld' specified in 'build-users-group' does not exist
warning: the group 'nixbld' specified in 'build-users-group' does not exist
replacing old 'nix-2.18.1'
installing 'nix-2.24.12'
root@debian:~# 

The source IP address making the request doesn't seem to matter, so it doesn't seem to be a case of GitHub throttling one IP.

Steps To Reproduce

Occurs randomly as described above.

Expected behavior

The command should work reliably.

Metadata

nix-env (Nix) 2.24.12

Additional context

N/A

Checklist


Add 👍 to issues you find important.

@SuperSandro2000
Copy link
Member

You can check the IPs rate limit with https://api.github.com/rate_limit

@the-sun-will-rise-tomorrow
Copy link
Contributor Author

@SuperSandro2000

  1. This is https://github.com/.../raw/... not api.github.com
  2. As mentioned, this does not seem to be IP-specific - I saw this in quick succession on two different machines that are on different continents which do not query GitHub frequently
  3. The link shows that the limits are full (untouched), as expected

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

No branches or pull requests

2 participants