Skip to content

XLoader Freezes on Large Files (>2GB) Due to Non-Chunked copy_expert #259

@cgoldshtein

Description

@cgoldshtein

Problem
XLoader uses copy_expert to load entire files at once, causing the process to freeze/hang when processing very large files (>2GB). This makes the system unresponsive and may cause timeouts or memory exhaustion.

Current Behavior
Loads entire 2GB+ file into memory at once

System freezes for hours with no feedback

May crash due to memory exhaustion

Users cannot tell if process is working or stuck

Expected Behavior
Process files in small chunks (e.g., 100MB pieces)

Show progress updates ("Processing chunk 5 of 20")

Use consistent memory regardless of file size

System remains responsive during upload

Impact
System becomes unresponsive for hours

Memory exhaustion on large datasets

No way to track upload progress

Poor experience with big data files

Proposed Solution
Currently working on chunked processing with configurable ckanext.xloader.copy_chunk_size parameter to process files in smaller pieces (e.g., 100MB chunks) while maintaining performance for multi-gigabyte files.

Related to #255

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions