HumanSignal/label-studio · error · ValidationError
Maximum total size of all files is {settings.TASKS_MAX_FILE_
Error message
Maximum total size of all files is {settings.TASKS_MAX_FILE_SIZE} bytes, current size is {value} bytes What it means
ValidationError raised by check_tasks_max_file_size in label_studio/data_import/uploader.py. Label Studio caps the combined size of all uploaded files per import request at settings.TASKS_MAX_FILE_SIZE (default 100 MB). When the computed total (sum of file.size, or a Content-Length header) is >= the limit, the import is rejected before download/processing.
Source
Thrown at label_studio/data_import/uploader.py:54
num_columns = len(line.split(b',' if isinstance(line, bytes) else ','))
for i in range(num_columns):
names.append('column' + str(i + 1))
file.seek(0)
return names
def check_max_task_number(tasks):
# max tasks
if len(tasks) > settings.TASKS_MAX_NUMBER:
raise ValidationError(
f'Maximum task number is {settings.TASKS_MAX_NUMBER}, current task number is {len(tasks)}'
)
def check_tasks_max_file_size(value):
if value >= settings.TASKS_MAX_FILE_SIZE:
raise ValidationError(
f'Maximum total size of all files is {settings.TASKS_MAX_FILE_SIZE} bytes, current size is {value} bytes'
)
def check_extensions(files):
for filename, file_obj in files.items():
_, ext = os.path.splitext(file_obj.name)
if ext.lower() not in settings.SUPPORTED_EXTENSIONS:
raise ValidationError(f'{ext} extension is not supported')
def check_request_files_size(files):
total = sum([file.size for _, file in files.items()])
check_tasks_max_file_size(total)
def create_file_upload(user, project, file):View on GitHub (pinned to 0b49e9b539)
Solutions
- Split the upload into multiple smaller files / requests, each under TASKS_MAX_FILE_SIZE (default 100 MB).
- Increase the limit via the TASKS_MAX_FILE_SIZE env var (or settings) and restart Label Studio.
- Compress or trim the input data (e.g. keep only needed columns) before importing.
- For URL imports, serve/point to a file below the limit or use storage synchronization instead of direct download.
Example fix
// before
const fd = new FormData();
fd.append('file', hugeFile); // 300MB
// after: chunk into <100MB pieces and import sequentially
const CHUNK = 90 * 1024 * 1024;
for (const part of sliceFile(hugeFile, CHUNK)) await importOne(part); Defensive patterns
Strategy: validation
Validate before calling
import os
MAX = int(os.environ.get('TASKS_MAX_FILE_SIZE', 104857600))
total = sum(f.size for f in files)
if total >= MAX:
raise ValueError(f'Upload total {total} bytes >= limit {MAX}; split or raise TASKS_MAX_FILE_SIZE') Try / catch
try:
upload_files(files)
except ValidationError as e:
if 'Maximum total size of all files' in str(e):
for chunk in chunk_files(files, MAX // 2):
upload_files(chunk)
else:
raise Prevention
- Sum file sizes client-side and compare to TASKS_MAX_FILE_SIZE before upload.
- Chunk large uploads into pieces well under the limit (e.g. 90MB).
- For URL imports, check the Content-Length header first before handing the URL to the API.
- Keep the limit setting documented for users of your Label Studio instance.
When it happens
Trigger: check_request_files_size summing uploaded file sizes to >= TASKS_MAX_FILE_SIZE, or tasks_from_url reading a Content-Length header >= the limit before downloading a URL import.
Common situations: Uploading one huge CSV/JSON dump; multi-file upload where the combined size crosses the cap; URL import pointing at a large file; operator lowered TASKS_MAX_FILE_SIZE without telling users.
Related errors
- Maximum task number is {settings.TASKS_MAX_NUMBER}, current
- {ext} extension is not supported
- extract_message(e)
- load_tasks: Data root must be list
- load_tasks: No tasks added
AI-assisted analysis of HumanSignal/label-studio@0b49e9b539 (2026-08-29).
Data as JSON: /api/errors/7d7181bf0cd50425.
Report an issue: GitHub.