Skip to content

[Bug] POST request to /load in Unsloth Studio does not respond until the model is fully loaded, causing proxies like Cloudflare to time out #5206

Closed

Description

@markasoftware-tc

The /load API request is a POST request that does not respond (not even sending HTTP headers) until the model is loaded. For larger models this can take multiple minutes.

However, many reverse proxies are configured to kill requests after a relatively short timeout. For example, at my company, we use Cloudflare as a reverse proxy to people's GPU containers where they sometimes run unsloth, but Cloudflare kills connections that don't send HTTP headers within 120 seconds (and except on their Enterprise plan, you cannot change this setting). Many other reverse proxies have similar behavior. For example, Nginx has a default of 60 seconds.

All this together means that to use Unsloth studio behind a reverse proxy usually requires special setup. For this reason, it's generally considered poor practice to have such long-lived REST API endpoints. Especially since there are already other endpoints that tell you about the download progress (eg /gguf-download-progress), IMO the /load endpoint should return immediately once it's been determined that the requested model exists.

Thanks!

Note: Please do not remove the questions. Answer beside them.

  1. Did you update? pip install --upgrade unsloth unsloth_zoo

    yes, latest version

  2. Colab or Kaggle or local / cloud

    local

  3. Number GPUs used, use nvidia-smi

    1 gpu, but doesn't matter

  4. Which notebook? Please link!

    Not relevant.

  5. Which Unsloth version, TRL version, transformers version, PyTorch version?

    2026.4.8

  6. Which trainer? SFTTrainer, GRPOTrainer etc

    no trainer, just model loading

Activity

  1. rolandtannous commented on Apr 28, 2026

    @rolandtannous
    Contributor

    These endpoints are not meant to be used directly from external clients.
    If you want to load a model and have it ready for external API access, use unsloth studio run --model . The details of how you'd then call it , will be documented in the release this week.

  2. added
    help wanted
    and removed
    help wanted
    on Apr 28, 2026
  3. markasoftware-tc commented on Apr 28, 2026

    @markasoftware-tc
    Author

    Hi @rolandtannous, we don't call this API directly. Our clients run into this issue using the official Unsloth Studio web UI behind cloudflare; there's a visible error message when it times out.

  4. rolandtannous commented on May 1, 2026

    @rolandtannous
    Contributor
  5. danielhanchen commented on Sep 6, 2026

    @danielhanchen
    Member

    Fixed! /load commits headers at 15s and streams keepalive bytes every 20s now so Cloudflare / nginx don't time out.

    To update: the desktop app updates itself (Settings > General), otherwise unsloth studio update, or in Docker docker exec <container> unsloth-studio-update.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions