Dify Dataset Limits: 15MB File Upload Caps, Batch Rules, and Workarounds
The Dify dataset limit constrains knowledge base ingestion through a default 15MB file cap, batch thresholds, and storage ceilings. While self-hosted teams can adjust backend environment variables and reverse proxy configurations, cloud deployments encounter hard storage walls during large ingestion jobs. Connecting an external intelligent workspace through the Model Context Protocol lets Dify agents query large document collections without vector store bloat or file splitting.
What Are Dify Dataset Limits and Upload Thresholds?
Dify caps document file uploads at 15 MB by default, while Dify Cloud Professional and Team plans raise the upload limit to 50 MB, according to the official Dify documentation as of November 2026. A Dify dataset limit is a platform constraint on document uploads, typically 15MB per file and 10 files per batch on Dify Cloud, governing how much source material can be vectorized and indexed. When building retrieval-augmented generation applications, understanding these thresholds prevents ingestion failures, gateway errors, and runaway infrastructure costs.
The platform applies distinct boundaries depending on whether you run Dify Cloud or maintain a self-hosted instance. On Dify Cloud, file size and total dataset capacity scale with your subscription tier. On self-hosted deployments, the default configurations mirror the cloud baseline until an administrator modifies container environment variables and reverse proxy rules.
The table below outlines how limits apply across deployment tiers and hosting models:
These boundaries govern four interrelated operational dimensions:
- Single Document Upload Size. The dify document upload limit defines the maximum allowable byte size for an individual file. While Dify Cloud Sandbox and fresh Docker installations cap uploads at 15MB, Dify Cloud Professional and Team plans raise this ceiling to 50MB. Any file exceeding these thresholds fails validation before parsing begins.
- Batch Ingestion Caps. When uploading multiple files through the web console, Dify restricts batch volume. Cloud workspaces permit smaller batches on entry accounts and expanded batch volume on higher subscription tiers. Self-hosted Docker setups apply a conservative default batch cap to prevent concurrent worker thread exhaustion.
- Knowledge Data Storage Ceilings. The dify dataset size limit dictates total storage available for vectorized content. On Dify Cloud, High Quality indexing consumes Knowledge Data Storage resources, blocking new document uploads once the plan quota is exhausted. Dify measures this against High Quality indexing, which generates vector embeddings stored in databases such as Qdrant, Weaviate, Milvus, or pgvector. When knowledge storage reaches capacity, the API rejects new documents until older files are archived or removed.
- Request and Credential Quotas. Knowledge bases enforce request rate limits to preserve index responsiveness. In October 2026, discussions on the Dify GitHub repository highlighted related architectural boundaries in issue #44426, noting that self-hosted workspace dataset API key creation and per-App key creation operate under fixed default quotas per workspace.
Related guides
- ChatGPT Canvas Limits: File Sizes, Document Length, and WorkaroundsChatGPT Canvas limits documents to practical thresholds of roughly 4,000 lines of code or 25,000 words, running in an...
- ChatGPT Message Limits: Quotas, Cooldowns, and Large File WorkaroundsText chat in ChatGPT is unlimited; uploads, images, and voice are capped within rolling windows. When conducting...
- Perplexity Usage Limits: Free, Pro, and Enterprise Search and File Upload CapsPerplexity usage limits define the allowances for standard queries, multi-step Pro searches, session upload caps, and...
- How to Connect ChatGPT to Company Knowledge SafelyConnecting ChatGPT to company knowledge enables teams to query internal specifications, contracts, and operating...
- Salesforce Agentforce Limits: Tokens, Context Windows, and Grounding File CapsAgentforce limits establish operational boundaries for autonomous AI across Salesforce, including a 1.5 million hourly...
- Excel Row Limit: Exact Spreadsheet Ceilings and Large Dataset WorkaroundsThe Excel row limit is exactly 1,048,576 rows by 16,384 columns per worksheet, a hard technical specification...
More on this subject: AI Agents: General Guides (244 guides)
Why Dify Enforces Document Ingestion Limits
The dify file size limit exists to address concrete compute, memory, and networking constraints inherent to processing unstructured text for language models. Document ingestion is not simple binary storage: it is a multi-step transformation pipeline requiring text extraction, optical character recognition, semantic chunking, and high-dimensional vector generation.
Understanding these technical friction points clarifies why raising limits without adequate infrastructure causes system instability:
- Worker Memory Spikes During Extraction. Dify delegates document processing to background Celery workers. Parsing complex file formats such as nested PDFs, spreadsheets, and scanned records requires substantial memory. Ingestion libraries load document trees into memory to extract paragraphs and clean formatting. A complex PDF containing detailed vector graphics or multi-column layouts can expand dramatically in memory during Python runtime extraction, causing out-of-memory errors on small worker nodes.
- Embedding Latency and API Timeouts. Transforming extracted text chunks into dense vector representations requires repeated calls to embedding models, such as OpenAI, Cohere, or local HuggingFace embedding services. When an administrator uploads a large technical manual, the pipeline generates thousands of chunk segments. If an embedding provider experiences network latency or enforces strict rate limits, worker tasks stall, queue backlogs grow, and background jobs time out.
- Reverse Proxy Buffering and Gateway Headers. Web traffic entering Dify passes through a reverse proxy, typically Nginx, before reaching the backend API service. Proxies maintain default limits on request body sizes and connection durations. When an upload exceeds proxy buffer limits, Nginx terminates the connection before payload transmission finishes, returning an HTTP 413 error to the client browser.
- Client-Side Parsing and Browser Overhead. In Dify's web console, selecting many files simultaneously triggers client-side validation, hash generation, and metadata preparation. Attempting to process high batch volumes directly inside the web browser consumes local memory and locks the UI thread, causing browser tabs to freeze before network transmission begins.
How to Increase Upload and Batch Limits in Self-Hosted Dify
Self-hosted administrators running Dify on Docker Compose or Kubernetes can increase ingestion thresholds to accommodate larger source documents. Bypassing these defaults requires reconfiguring both the backend application limits and the front-facing reverse proxy. Adjusting only the application settings leaves the proxy barrier intact, resulting in immediate HTTP 413 errors.
Updating Docker Compose Environment Variables
For standard Docker deployments, configuration settings reside in the .env file inside the docker directory of your Dify repository clone.
Open your .env file and locate or append the following environment settings:
UPLOAD_FILE_SIZE_LIMIT=100
UPLOAD_FILE_BATCH_LIMIT=25
NGINX_CLIENT_MAX_BODY_SIZE=100M
Save the file and apply the new configuration by restarting the Docker containers:
docker compose down
docker compose up -d
Configuring Kubernetes and Helm Deployments
When deploying Dify via Helm charts in enterprise Kubernetes environments, update the values.yaml file under the API configuration block:
api:
limits:
uploadFileSize: 100
uploadFileBatchCount: 25
uploadImageFileSize: 10
nginx:
clientMaxBodySize: 100M
Apply the Helm revision to update deployment pods:
helm upgrade dify ./helm -f values.yaml
System Tradeoffs of Increasing Local Limits
Raising the dify knowledge base limit on local infrastructure introduces specific operational trade-offs:
- Host Resource Allocation. Each Celery worker process handling large file segmentation requires dedicated memory headroom. When running multiple concurrent worker processes that handle expanded document uploads, allocate dedicated host RAM to prevent out-of-memory container termination.
- Database Index Growth. Storing high-volume embeddings in pgvector or self-hosted Qdrant instances increases disk consumption and memory usage for database index caches. HNSW vector index builds demand significant CPU resources when documents contain tens of thousands of chunks.
- Provider Rate Limits. Large documents split into many chunks can quickly saturate external embedding API rate limits, leading to HTTP 429 errors during indexing runs.
Overcome Dify dataset limits with external agent storage
Connect Dify agents to persistent workspaces with built-in indexing and search over the Model Context Protocol. Monthly plans start with a 14-day free trial.
Comparing Retrieval Strategies for Large Document Collections
When document collections exceed Dify Cloud storage caps or outgrow self-hosted hardware capacity, teams must choose an architecture for managing knowledge retrieval. Three primary patterns exist for working around dataset limits:
Pattern 1: Document Splitting and Automated Batching
The simplest workaround involves slicing large files into smaller parts before uploading them to Dify. A Python script using libraries like PyPDF or PDFMiner can divide a large technical manual into smaller volumes.
While this pattern bypasses single-file caps, it creates several maintenance drawbacks:
- Loss of Cross-Boundary Context. Slicing documents by page count breaks contextual continuity. Paragraphs, tables, and conceptual descriptions split across separate file boundaries produce fragmented chunks during vector retrieval.
- Document Sprawl. Splitting dozens of manuals creates hundreds of independent files inside the Dify dataset console, complicating document versioning and metadata management.
- Processing Overhead. Teams must maintain pre-processing scripts and storage staging areas prior to document upload.
Pattern 2: Dedicated Vector Databases with Custom HTTP Tools
Teams can store raw documents in an Amazon S3 bucket or Google Cloud Storage bucket, generate embeddings with an independent pipeline, and store them directly in a managed vector database like Pinecone, Qdrant Cloud, or Milvus. Dify workflows then query this external vector database using custom HTTP tool nodes.
This pattern handles large data volumes but introduces substantial operational burden. Developers must build and maintain chunking pipelines, synchronize updates when source files change, and manage standalone vector database infrastructure.
Pattern 3: External Intelligent Workspaces
Rather than uploading source documents into Dify's internal vector store, teams can maintain files in an external intelligent workspace that handles indexing and exposes retrieval dynamically over standard protocols.
Fast.io provides persistent cloud workspaces designed for agentic workflows through /storage-for-agents/. Instead of maintaining separate vector stores and embedding pipelines, files placed into a workspace are automatically indexed for hybrid search across full-text, semantic meaning, and metadata attributes once Intelligence Mode is enabled.
The table below compares Fast.io plan tiers and storage capacities:
Monthly plans start with a 14-day free trial that requires a credit card. Subscriptions can be reviewed on the /pricing/ page. This structure eliminates file size bottlenecks:
- Multi-Source Document Sync. Cloud Sync connects Google Drive, Dropbox, Box and OneDrive folders to a workspace, one-way or two-way, on a schedule or on demand. Teams can centralize knowledge bases from existing corporate storage without manual export routines.
- On-Demand Retrieval via MCP. Agents connect to the workspace through the Model Context Protocol endpoint at
https://mcp.fast.io/mcp/tools. Rather than loading large corpora directly into Dify datasets, the agent queries the workspace dynamically during conversation runs.
How to Query External Workspaces from Dify via MCP
Connecting Dify to an external intelligent workspace gives your agents access to deep document libraries without hitting Dify Cloud's 15MB or 50MB file size limits. Dify workflows can query the workspace on demand using custom tool nodes or an MCP bridge, retrieving relevant passages with exact source citations. Detailed endpoint references are available in the Fast.io MCP documentation.
Step 1: Set Up the Workspace and Enable Intelligence
Create an organization workspace in Fast.io to house your reference documentation. Upload your source files directly through the web interface, the @vividengine/fastio-cli command line utility, or configure Cloud Sync to ingest folders from Google Drive, Dropbox, Box, or OneDrive on a schedule.
In the workspace settings, turn on Intelligence Mode. The platform processes documents in the background, creating a hybrid index combining keyword search, semantic embeddings, and metadata extraction.
fastio upload file ./archive-2026.pdf --workspace engineering-docs
Step 2: Configure Workspace Retrieval in Dify
Dify workflows connect to external services using Custom Tools or HTTP Request nodes. The Fast.io MCP server operates over Streamable HTTP at https://mcp.fast.io/mcp/tools. For server-side Dify workflows, configure an HTTP Tool node that communicates with the search action using a scoped API key:
{
"endpoint": "https://mcp.fast.io/mcp/tools",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR_FASTIO_API_KEY",
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream"
},
"body": {
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "storage",
"arguments": {
"action": "search",
"profile_type": "workspace",
"profile_id": "YOUR_WORKSPACE_ID",
"query": "{{#sys.query#}}"
}
}
}
}
Step 3: Parse Retrieved Context in Workflow Prompts
The search action returns ranked document excerpts along with source document metadata and citations. In your Dify LLM node, reference the output from the retrieval node:
You are an engineering assistant answering technical questions based on official documentation.
Context from Workspace:
{{#http_request.result.content#}}
User Question:
{{#sys.query#}}
Instructions:
Answer the question accurately using the provided context. Cite the source document name and relevant section for every factual claim.
Step 4: Structured Extraction with Metadata Views
For datasets containing structured forms, invoices, contracts, or tabular reports, use Metadata Views by visiting /product/document-data-extraction/. Metadata Views turn uploaded documents into queryable tables by defining fields in natural language. AI designs a typed schema across text, integer, decimal, boolean, URL, JSON, and date fields, matching files in the workspace and populating a sortable sheet without OCR templates. Dify agents can query these structured records directly through MCP tool calls to retrieve precise values without parsing noisy PDF text.
Troubleshooting Ingestion and Retrieval Errors
When managing large document sets in Dify, keep these diagnostic steps in mind:
- Resolving HTTP 413 Errors. If an upload returns
413 Request Entity Too Large, the front-facing proxy blocked the request. In self-hosted setups, check thatNGINX_CLIENT_MAX_BODY_SIZEin your.envfile matches or exceedsUPLOAD_FILE_SIZE_LIMIT. On Dify Cloud, split the file or move it to an external workspace. - Handling Rate Limit Restraints. If knowledge queries fail during automated testing, you have exceeded the requests-per-minute quota for your plan. Space out batch evaluation jobs or route search through an external workspace endpoint.
- Addressing Extraction Timeouts. Scanned PDFs with poor image quality can stall optical character recognition. Pre-process scanned files through a dedicated document pipeline or extract structured fields with Metadata Views before querying.
Sources
References used to verify factual claims in this guide.
-
Dify caps document file uploads at 15 MB by default, while Dify Cloud Professional and Team plans raise the upload limit to 50 MB.
-
On Dify Cloud, High Quality indexing consumes Knowledge Data Storage resources, blocking new document uploads once the plan quota is exhausted.
Frequently Asked Questions
What is the file upload limit for Dify datasets?
Dify Cloud Sandbox limits document uploads to 15MB per file and 10 files per batch, with a total dataset storage quota of 50MB. Dify Cloud Professional and Team plans raise the single-file limit to 50MB, batch sizes up to 50 files, and dataset storage allowances to 5GB and 20GB. Self-hosted deployments inherit the default 15MB file upload cap until administrators adjust container settings.
How do you increase the upload size limit in Dify?
In self-hosted Dify environments, edit the `.env` file located in your `docker` folder. Update `UPLOAD_FILE_SIZE_LIMIT` to your target megabyte value (such as 100) and set `NGINX_CLIENT_MAX_BODY_SIZE=100M` to prevent proxy rejections. Restart containers using `docker compose down && docker compose up -d`. On Dify Cloud, increasing limits requires upgrading to Professional or Team tiers.
Why does Dify return a 413 Request Entity Too Large error during upload?
An HTTP 413 error occurs when an uploaded file exceeds the maximum request body size permitted by the Nginx reverse proxy sitting in front of Dify's API. Even if you increase the application limit, Nginx will reject the file unless `NGINX_CLIENT_MAX_BODY_SIZE` or `client_max_body_size` is explicitly configured to match or exceed the file size.
Can Dify query documents stored in an external workspace?
Yes. Dify workflows can connect to external storage systems and intelligent workspaces using HTTP tool nodes or Model Context Protocol bridges. Connecting to Fast.io over MCP allows Dify agents to search indexed documents dynamically without uploading raw files into Dify datasets.
Does Dify support syncing documents from Google Drive or OneDrive?
Dify Cloud provides native data source connectors for select services, but document size and batch quotas still apply upon import. Alternatively, connecting an external workspace allows teams to sync files from Google Drive, Dropbox, Box, and OneDrive on a schedule, querying the indexed files through MCP without duplicating storage inside Dify.
How does batch uploading affect Dify server memory?
Batch uploading processes multiple files concurrently through Celery background workers. Each worker loads file text into memory for parsing, segmentation, and embedding calls. Uploading multiple large files simultaneously can exhaust server RAM and trigger out-of-memory container restarts unless worker concurrency is carefully capped.
Related Resources
Overcome Dify dataset limits with external agent storage
Connect Dify agents to persistent workspaces with built-in indexing and search over the Model Context Protocol. Monthly plans start with a 14-day free trial.