Skip to main content

Upload settings

Configure where Foxlet uploads recordings when you import them to your Primary Site.

Choose an upload destination​

Set PRIMARY_SITE_MODE explicitly to match your Primary Site. If you don't set PRIMARY_SITE_MODE, Foxlet uploads to a Foxglove-hosted Primary Site.

For a Foxglove-hosted Primary Site, set:

PRIMARY_SITE_MODE=hosted

No cloud credentials are needed. Foxglove provides the upload destination.

Object storage upload options​

For self-hosted and BYOS uploads, MULTIPART_PART_SIZE controls the size of multipart upload parts, in bytes. Files smaller than this size use a single upload request; files at or above it use multipart uploads. Foxglove-hosted uploads don't use this setting.

MULTIPART_PART_SIZE=8388608

AWS and Google Cloud Storage allow at most 10,000 parts in one upload. At the default size of 8 MiB, the largest file is 80,000 MiB (about 78 GiB). To upload larger files, increase this value. Both providers require parts of 5 MiB or more, except for the last part.

Each upload sends up to 5 parts at the same time and keeps each part in memory until it uploads. Memory use for an upload is approximately 5 times the part size.

In Foxlet v1.8.0 and later, MULTIPART_UPLOAD_CONCURRENCY sets the number of parts that an upload sends at the same time, and each upload request must finish within 600 seconds. Memory use for an upload is approximately MULTIPART_UPLOAD_CONCURRENCY times the part size. The parts share the network link, so with the default part size and concurrency, uploads need a link of about 0.56 Mbit/s or faster. For slower links, set these optional variables with any storage provider.

# Optional: maximum number of parts to upload at the same time (default: 5).
# Lower this on slow links. Foxlet keeps each part in memory until it uploads.
#MULTIPART_UPLOAD_CONCURRENCY=5
# Optional: time limit for each upload request, in seconds (default: 600).
#OBJECT_STORE_READ_TIMEOUT_SECONDS=600

In Foxlet v1.9.0 and later, UPLOAD_CONCURRENCY sets the number of recordings that Foxlet uploads at the same time. Total memory use and the necessary link speed are approximately UPLOAD_CONCURRENCY times the values above. See Additional options.

By default, Foxlet uploads each recording under a recordingId=<id>/ directory. To upload each recording at its path relative to STORAGE_ROOT instead, set PRESERVE_UPLOAD_PATH=true. This option requires Foxlet v1.8.0 or later, and is supported only for an inbox that uses the index-in-place storage mode. Recording paths must be unique across all devices that share the bucket. Before each upload, Foxlet checks for an existing object at the destination; if one exists, Foxlet reports an error and does not replace it. This check needs permission to read objects in the bucket (on S3, s3:GetObject and s3:ListBucket).

# Optional: upload each recording at its path relative to STORAGE_ROOT,
# without the recordingId=<id>/ directory (default: false).
# Use only with an index-in-place inbox.
#PRESERVE_UPLOAD_PATH=false

Upload connection options​

These settings control keepalive pings when an upload connection uses HTTP/2. Each value is a positive integer followed by a time unit (ms, s, m, or h). The values shown are the defaults.

UPLOAD_HTTP2_KEEP_ALIVE_INTERVAL=10s
UPLOAD_HTTP2_KEEP_ALIVE_TIMEOUT=30s

They apply only to connections that use HTTP/2. Google Cloud Storage uploads always use HTTP/1.1. S3-compatible uploads use HTTP/1.1 unless you set S3_COMPATIBLE_ALLOW_HTTP2=true. AWS and Azure uploads use HTTP/2 only if the storage endpoint supports it. If a Foxglove-hosted upload doesn't use HTTP/2, the log shows upload to foxglove-hosted storage used HTTP version ... that does not support keepalive pings once.