本地docker部署,数据集创建上传pdf文件失败 #618

Closed
opened 2026-02-21 17:27:46 -05:00 by yindo · 8 comments
Owner

Originally created by @lilinrestart on GitHub (Oct 24, 2023).

Dify version

0.3.28

Cloud or Self Hosted

Self Hosted, Other (please specify in "Steps to Reproduce")

Steps to reproduce

本地部署官方文档里的docker步骤,新建数据集然后上传文件

✔️ Expected Behavior

No response

Actual Behavior

5m以内的四个文件上传失败(带图片),另外2个几百kb的上传成功(纯文字),在线使用能上传成功。。
image

Originally created by @lilinrestart on GitHub (Oct 24, 2023). ### Dify version 0.3.28 ### Cloud or Self Hosted Self Hosted, Other (please specify in "Steps to Reproduce") ### Steps to reproduce 本地部署官方文档里的docker步骤,新建数据集然后上传文件 ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior 5m以内的四个文件上传失败(带图片),另外2个几百kb的上传成功(纯文字),在线使用能上传成功。。 ![image](https://github.com/langgenius/dify/assets/140720825/64b76dfa-b348-4864-9319-b401a3b237b4)
yindo added the 🐞 bug label 2026-02-21 17:27:46 -05:00
yindo closed this issue 2026-02-21 17:27:46 -05:00
Author
Owner

@crazywoola commented on GitHub (Oct 24, 2023):

Need some detailed logs on the frontend upload api. Can you provide them.
https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi
We set the default values to 15M, it seems the reverse proxy of your own is not config correctly in your case.

@crazywoola commented on GitHub (Oct 24, 2023): Need some detailed logs on the frontend upload api. Can you provide them. https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi We set the default values to 15M, it seems the reverse proxy of your own is not config correctly in your case.
Author
Owner

@lilinrestart commented on GitHub (Oct 24, 2023):

需要一些关于前端上传 api 的详细日志。你能提供一下吗? https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi 我们设置默认值为15M,看来是反向代理在您的情况下,您自己的配置不正确。

我只修改了dockercompose.yaml里面的映射端口设置,
nginx:
image: nginx:latest
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/proxy.conf:/etc/nginx/proxy.conf
- ./nginx/conf.d:/etc/nginx/conf.d
depends_on:
- api
- web
ports:
- "7030:80"

db:
image: postgres:15-alpine
restart: always
environment:
PGUSER: postgres
# The password for the default postgres user.
POSTGRES_PASSWORD: difyai123456
# The name of the default postgres database.
POSTGRES_DB: dify
# postgres data directory
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./volumes/db/data:/var/lib/postgresql/data
ports:
- "5434:5432"

@lilinrestart commented on GitHub (Oct 24, 2023): > 需要一些关于前端上传 api 的详细日志。你能提供一下吗? https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi 我们设置默认值为15M,看来是反向代理在您的情况下,您自己的配置不正确。 我只修改了dockercompose.yaml里面的映射端口设置, nginx: image: nginx:latest volumes: - ./nginx/nginx.conf:/etc/nginx/nginx.conf - ./nginx/proxy.conf:/etc/nginx/proxy.conf - ./nginx/conf.d:/etc/nginx/conf.d depends_on: - api - web ports: **- "7030:80"** db: image: postgres:15-alpine restart: always environment: PGUSER: postgres # The password for the default postgres user. POSTGRES_PASSWORD: difyai123456 # The name of the default postgres database. POSTGRES_DB: dify # postgres data directory PGDATA: /var/lib/postgresql/data/pgdata volumes: - ./volumes/db/data:/var/lib/postgresql/data ports: **- "5434:5432"**
Author
Owner

@lilinrestart commented on GitHub (Oct 24, 2023):

需要一些关于前端上传 api 的详细日志。你能提供一下吗? https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi 我们设置默认值为15M,看来是反向代理在您的情况下,您自己的配置不正确。

我发现pdf里面带了图片就无法上传成功,貌似是这个问题

@lilinrestart commented on GitHub (Oct 24, 2023): > 需要一些关于前端上传 api 的详细日志。你能提供一下吗? https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi 我们设置默认值为15M,看来是反向代理在您的情况下,您自己的配置不正确。 我发现pdf里面带了图片就无法上传成功,貌似是这个问题
Author
Owner

@lilinrestart commented on GitHub (Oct 24, 2023):

需要一些关于前端上传 api 的详细日志。你能提供一下吗? https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi 我们设置默认值为15M,看来是反向代理在您的情况下,您自己的配置不正确。

出现了错误,我通过自己设置的代理访问的,我把7030使用nginx代理成dify.出来访问的,是这个原因吗?
docker-nginx-1 | 2023/10/25 03:33:46 [error] 30#30: 19 connect() failed (111: Connection refused) while connecting to upstream, client: 17 2.22.0.1, server: _, request: "GET /console/api/workspaces/current/models/model-type/embeddings HTTP/1.1", upstream: "http://172.22.0.7:5001/co nsole/api/workspaces/current/models/model-type/embeddings", host: "dify.
", referrer: "http://dify
***/datasets/cre ate"

@lilinrestart commented on GitHub (Oct 24, 2023): > 需要一些关于前端上传 api 的详细日志。你能提供一下吗? https://docs.dify.ai/v/zh-hans/getting-started/install-self-hosted/environments#shu-ju-ji-pei-zhi 我们设置默认值为15M,看来是反向代理在您的情况下,您自己的配置不正确。 出现了错误,我通过自己设置的代理访问的,我把7030使用nginx代理成dify.***出来访问的,是这个原因吗? docker-nginx-1 | 2023/10/25 03:33:46 [error] 30#30: *19 connect() failed (111: Connection refused) while connecting to upstream, client: 17 2.22.0.1, server: _, request: "GET /console/api/workspaces/current/models/model-type/embeddings HTTP/1.1", upstream: "http://172.22.0.7:5001/co nsole/api/workspaces/current/models/model-type/embeddings", host: "dify.***", referrer: "http://dify****/datasets/cre ate"
Author
Owner

@lilinrestart commented on GitHub (Oct 24, 2023):

前端的报错信息
image

@lilinrestart commented on GitHub (Oct 24, 2023): 前端的报错信息 ![image](https://github.com/langgenius/dify/assets/140720825/4049cd50-7fea-47c8-a2cd-e23765581dc0)
Author
Owner

@crazywoola commented on GitHub (Oct 25, 2023):

前端的报错信息 image

Entity too large usually means 👇

By default, NGINX® has a upload limit of 1 MB per file. By editing client_max_body_size, you adjust the file upload size.

@crazywoola commented on GitHub (Oct 25, 2023): > 前端的报错信息 ![image](https://user-images.githubusercontent.com/140720825/277867035-4049cd50-7fea-47c8-a2cd-e23765581dc0.png) Entity too large usually means 👇 > By default, NGINX® has a upload limit of 1 MB per file. By editing client_max_body_size, you adjust the file upload size.
Author
Owner

@lilinrestart commented on GitHub (Oct 25, 2023):

前端的报错信息 图像

实体太大通常意味着👇

默认情况下,NGINX® 每个文件的上传限制为 1 MB。通过编辑client_max_body_size,您可以调整文件上传大小。

image
我设置的是1024m

@lilinrestart commented on GitHub (Oct 25, 2023): > > 前端的报错信息 ![图像](https://user-images.githubusercontent.com/140720825/277867035-4049cd50-7fea-47c8-a2cd-e23765581dc0.png) > > 实体太大通常意味着👇 > > > 默认情况下,NGINX® 每个文件的上传限制为 1 MB。通过编辑client_max_body_size,您可以调整文件上传大小。 ![image](https://github.com/langgenius/dify/assets/140720825/897876ed-56e1-4540-b7f0-856069722852) 我设置的是1024m
Author
Owner

@lilinrestart commented on GitHub (Oct 25, 2023):

前端的报错信息 图像

实体太大通常意味着👇

默认情况下,NGINX® 每个文件的上传限制为 1 MB。通过编辑client_max_body_size,您可以调整文件上传大小。

image 我设置的是1024m

对于此docker compose部署,我仅修改了配置文件中的映射端口,然后设置了nginx代理访问页面,并没有做其他任何改动....

@lilinrestart commented on GitHub (Oct 25, 2023): > > > 前端的报错信息 ![图像](https://user-images.githubusercontent.com/140720825/277867035-4049cd50-7fea-47c8-a2cd-e23765581dc0.png) > > > > > > 实体太大通常意味着👇 > > > 默认情况下,NGINX® 每个文件的上传限制为 1 MB。通过编辑client_max_body_size,您可以调整文件上传大小。 > > ![image](https://user-images.githubusercontent.com/140720825/277884579-897876ed-56e1-4540-b7f0-856069722852.png) 我设置的是1024m 对于此docker compose部署,我仅修改了配置文件中的映射端口,然后设置了nginx代理访问页面,并没有做其他任何改动....
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#618