Skip to content

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

Closed

Description

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.

Activity

  1. SuperSandro2000 commented on Feb 4, 2025

    @SuperSandro2000
    Member
  2. the-sun-will-rise-tomorrow commented on Feb 4, 2025

    @the-sun-will-rise-tomorrow
    ContributorAuthor

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions