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

60s Upload timeout #170

Open
Svenum opened this issue Sep 3, 2024 · 3 comments
Open

60s Upload timeout #170

Svenum opened this issue Sep 3, 2024 · 3 comments

Comments

@Svenum
Copy link

Svenum commented Sep 3, 2024

After 60 seconds my push is failing with this error:

⚙  Pushing 1 paths to "default" on "local" (397 already cached, 1760 in upstream)...
❌ ac3cny7i85v3zba06cbcvi73xjkbwrja-nerdfonts-3.2.1: HTTP 499 <unknown status code>: Client Closed Request
Error: HTTP 499 <unknown status code>: Client Closed Request

Any idea?

Here is my docker config:

services:
  attic:
    image: ghcr.io/zhaofengli/attic:latest
    volumes:
      - /mnt/cache/appdata/nix/attic/server.toml:/attic/server.toml
      - /mnt/cache/appdata/nix/attic/server.db:/attic/server.db
      - /mnt/user/nix_cache:/attic/storage
    command: [ "-f", "/attic/server.toml" ]
    ports:
      - 8080:8080

server.toml:

#
# This is the endpoint exposed to clients in `cache-config` responses.
#
# This _must_ be configured for production use. If not configured, the
# API endpoint is synthesized from the client's `Host` header which may
# be insecure.
#
# The API endpoint _must_ end with a slash (e.g., `https://domain.tld/attic/`
# not `https://domain.tld/attic`).
#api-endpoint = "https://your.domain.tld/"

# Whether to soft-delete caches
#
# If this is enabled, caches are soft-deleted instead of actually
# removed from the database. Note that soft-deleted caches cannot
# have their names reused as long as the original database records
# are there.
#soft-delete-caches = false

# Whether to require fully uploading a NAR if it exists in the global cache.
#
# If set to false, simply knowing the NAR hash is enough for
# an uploader to gain access to an existing NAR in the global
# cache.
#require-proof-of-possession = true

# JWT signing token
#
# Set this to the Base64 encoding of some random data.
# You can also set it via the `ATTIC_SERVER_TOKEN_HS256_SECRET_BASE64` environment
# variable.
token-hs256-secret-base64 = "SECRET"

# Database connection
[database]
# Connection URL
#
# For production use it's recommended to use PostgreSQL.
url = "sqlite:///attic/server.db"

# Whether to enable sending on periodic heartbeat queries
#
# If enabled, a heartbeat query will be sent every minute
#heartbeat = false

# File storage configuration
[storage]
# Storage type
#
# Can be "local" or "s3".
type = "local"

# ## Local storage

# The directory to store all files under
path = "/attic/storage"

# ## S3 Storage (set type to "s3" and uncomment below)

# The AWS region
#region = "us-east-1"

# The name of the bucket
#bucket = "some-bucket"

# Custom S3 endpoint
#
# Set this if you are using an S3-compatible object storage (e.g., Minio).
#endpoint = "https://xxx.r2.cloudflarestorage.com"

# Credentials
#
# If unset, the credentials are read from the `AWS_ACCESS_KEY_ID` and
# `AWS_SECRET_ACCESS_KEY` environment variables.
#[storage.credentials]
#  access_key_id = ""
#  secret_access_key = ""

# Data chunking
#
# Warning: If you change any of the values here, it will be
# difficult to reuse existing chunks for newly-uploaded NARs
# since the cutpoints will be different. As a result, the
# deduplication ratio will suffer for a while after the change.
[chunking]
# The minimum NAR size to trigger chunking
#
# If 0, chunking is disabled entirely for newly-uploaded NARs.
# If 1, all NARs are chunked.
nar-size-threshold = 65536 # chunk files that are 64 KiB or larger

# The preferred minimum size of a chunk, in bytes
min-size = 16384            # 16 KiB

# The preferred average size of a chunk, in bytes
avg-size = 65536            # 64 KiB

# The preferred maximum size of a chunk, in bytes
max-size = 262144           # 256 KiB

# Compression
[compression]
# Compression type
#
# Can be "none", "brotli", "zstd", or "xz"
type = "zstd"

# Compression level
#level = 8

# Garbage collection
[garbage-collection]
# The frequency to run garbage collection at
#
# By default it's 12 hours. You can use natural language
# to specify the interval, like "1 day".
#
# If zero, automatic garbage collection is disabled, but
# it can still be run manually with `atticd --mode garbage-collector-once`.
interval = "7 days"

# Default retention period
#
# Zero (default) means time-based garbage-collection is
# disabled by default. You can enable it on a per-cache basis.
#default-retention-period = "6 months"
@adamcstephens
Copy link
Contributor

A reverse proxy could be terminating at 60s.

@Svenum
Copy link
Author

Svenum commented Sep 3, 2024

I tried with and without a proxy in between. Everytime the same behaviour.

@Svenum
Copy link
Author

Svenum commented Sep 21, 2024

I only get this error with the nerdfont and nvidia package:

❌ nz9vmyg6vw2f8r2psfw69k0r2a6iavx8-nvidia-x11-560.35.03-6.11-bin: HTTP 499 <unknown status code>: Client Closed Request
❌ 8bibp95qs2m60swxyk5np7kmsvm7wy25-nvidia-x11-560.35.03-6.11: HTTP 499 <unknown status code>: Client Closed Request
❌ py5fwy2dzbf2r785gqbm77wh1ydv8xc6-nerdfonts-3.2.1: HTTP 499 <unknown status code>: Client Closed Request

This is how I use nerdfont it:

environment.systemPackages = with pkgs; [
  nerdfonts
];

And here how I use nvidia: https://github.com/Svenum/holynix/blob/main/modules/nixos/gpu/nvidia/default.nix

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

No branches or pull requests

2 participants