mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-07-22 04:15:24 -04:00
[DOCS]: Document Indexing Fails with 404 Errors During Embedding Process - #224
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jryanhaber on GitHub (Aug 12, 2025).
Type of Documentation Change
Other
Documentation Page URL or Path
No response
Current Content
Description:
When uploading documents to a Knowledge Base in Dify, the frontend
continuously polls for indexing status but receives 404 (NOT FOUND)
errors. The document indexing process fails to start properly due to
multiple configuration issues in the Docker environment.
Steps to Reproduce:
/console/api/datasets/{id}/batch/{batch_id}/indexing-status
Expected Behavior:
Document should be processed, embedded, and stored in the vector database
successfully with proper API responses for status polling.
Actual Behavior:
Environment Details:
Root Causes Identified:
- Weaviate was configured in .env (VECTOR_STORE=weaviate) but container
wasn't running
- Required manual start: docker compose --profile weaviate up weaviate
-d
- Fix: Started Weaviate container explicitly
- Container logs showed: [WARN]python lib path /usr/lib/python3.10 is
not available
- Document processing requires Python for parsing/chunking
- Fix: Created custom Dockerfile with proper Python installation and
library paths
- Multiple containers showed: setlocale: LC_ALL: cannot change locale
(en_US.UTF-8)
- Affects text processing and encoding
- Fix: Added LANG: en_US.UTF-8 and LC_ALL: en_US.UTF-8 to all API
containers
- API container missing OPENAI_API_KEY environment variable
- Without embedding provider, documents can't be vectorized
- Status: Requires OpenAI API key configuration
Investigation Details:
Container Status Checked:
docker compose ps
Weaviate was missing from running containers
Log Analysis:
docker logs docker-sandbox-1 --tail 50
Showed Python path warnings during dependency updates
docker logs docker-api-1 --tail 100 | grep -E "(batch|index|dataset)"
No indexing activity found in API logs
Database Verification:
SELECT id, dataset_id, batch, indexing_status, created_at FROM documents
WHERE created_at > NOW() - INTERVAL '2 hours';
No recent document records found
Configuration Files Modified:
api/worker/worker_beat
Immediate Fixes Applied:
Next Steps Required:
Technical Notes:
indexing pipeline failure
document processing
error messages
but errors are only visible in container logs
Suggested Changes
Clear setup instructions that show how to navigate these types of issues, informative console logs on errors or automated handling.
Clear docs indicating the known issues and what to do about them.
It does not make sense that I load my open ai in to the config but then the code fails if theres not also an api key in the .env, and the errors happen with almost zero clues as to the cause in the logs or error handling. Each critical error ( bad python, bad api key ) ideally would have a console log describing the issue somewhere.
Reason for Change
this is not about the docs, thats just the linked docs that failed to address these issues
Code of Conduct
@onestardao commented on GitHub (Aug 12, 2025):
Thanks for providing the detailed breakdown of the problem, environment, and suspected root causes — that really speeds up troubleshooting.
From the description, the key blockers seem to be:
Suggested next steps for the sprint:
If you’d like, I can draft a minimal Docker config patch that aligns the container setups and addresses the missing dependencies so we can test in the next sprint cycle.
@crazywoola commented on GitHub (Aug 15, 2025):
@dosu validate this issue.
@dosubot[bot] commented on GitHub (Aug 15, 2025):
This issue is valid. The document indexing failures with 404 errors during embedding in Dify's Docker setup are caused by multiple configuration problems: missing or misconfigured vector database container (Weaviate), Python environment issues in the sandbox container, locale configuration problems, and missing OPENAI_API_KEY in the API container. These root causes and troubleshooting steps are accurate and align with Dify's architecture and deployment requirements. The lack of actionable error logs and setup guidance is a real gap—recent code changes have improved error handling and logging for indexing failures, but clearer setup instructions and more informative logs for critical environment issues are still needed to help users diagnose and resolve these problems efficiently.
Source 1 | Source 2
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

@jryanhaber commented on GitHub (Aug 15, 2025):
@crazywoola Thanks for the details on this.
I was really not clear on the docs what the options are for this. for other projects I have hand built vectorization systems and run them locally, and thats likely the direction I would take once I get past these issues if I go deeper here.
The biggest gap for me is that I was not able to get my agents familiar with your code even with the docs, so the process of trying to convert a sophisticated back end work flow into your system was super painful, even just getting to any measurable result was pretty challenging.
It might just be a learning curve and I can sense that this would have a lot of upside if I could get it running.
What you guys are building drag and drop, I have an already super robust agentic flow thats mostly hand coded plus langchain...
But in theory, If I could get your system working, I could take just the highest value elements out of it, wire into your system, and I think expose that as an api locally in my system, and then literally just call your functionality as though it is an operational back end.
Presumably I could then once working push it to production and let it operate at scale.
Is that a valid and actual use case here?
Would it be chaos?
Im not using docker at the moment. I run a front end and back end, back end in linode, front in vercel. Well, 3 front ends at the moment, soon to be 4.
Its rough trying to figure out if the tool your building will actually add value, it absolutely could, but will it...
For example, I literally just built a long term memory myself, extraction, vectorization, vector search, and injection into context in session.
And it looks like you have some drag and drop tools that would have handled that, cutting 20 hrs of work down to maybe 1 hr if i understood them well. but then, trying to figure out how to get your system into a production environment stably... thats what Im not clear about.
It could be that your intent is actually much more aligned with tinkering and testing and rapid iteration like zapier, but not really stable as a production deployment or reasonable.
Let me know?
You mentioned .env config, but is there a specific setup flow for what embedding systems I would use? Just one default?
I sure don't want to be tied to pinecone right, they overcharge like crazy.
If there was a setup step by step for vector memory, I just did not see it in the docs... seemed like you just mostly defined the key terms for some reason, let me know if I missed something.
Jonathan
@crazywoola commented on GitHub (Aug 18, 2025):
Well, we are trying to let the coding agents to understand our code base, but unfortunately, it still needs some time. Even for me, I can not guarantee I under 100% of our code bases, because it's rather big.
If it can cut 20hrs of work down to maybe 1hr in a single team, then it will save lot's of man hours. I think it can be called as "real cases in the production". We do not recommend deploy the code through the source code, our enterprise version provide out-of-box solution, a helm chart. Which can scale the services at ease. Our saas platform has almost 1m users already which should be a solid proof of "Production".
Actually, our slogan is "Dify offers everything you need — agentic workflows, RAG pipelines, integrations, and observability — all in one place, putting AI power into your hands.", you can find existing customers listed in our website. https://dify.ai
@dosubot[bot] commented on GitHub (Aug 29, 2025):
Hi, @jryanhaber. I'm Dosu, and I'm helping the dify-docs team manage their backlog and am marking this issue as stale.
Issue Summary:
Next Steps:
Thank you for your understanding and contribution!