dify icon indicating copy to clipboard operation
dify copied to clipboard

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

Open lilinrestart opened this issue 3 years ago • 8 comments

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

lilinrestart avatar Oct 24 '23 11:10 lilinrestart

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 avatar Oct 25 '23 02:10 crazywoola

需要一些关于前端上传 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 avatar Oct 25 '23 03:10 lilinrestart

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

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

lilinrestart avatar Oct 25 '23 03:10 lilinrestart

需要一些关于前端上传 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 avatar Oct 25 '23 03:10 lilinrestart

前端的报错信息 image

lilinrestart avatar Oct 25 '23 03:10 lilinrestart

前端的报错信息 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 avatar Oct 25 '23 05:10 crazywoola

前端的报错信息 图像

实体太大通常意味着👇

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

image 我设置的是1024m

lilinrestart avatar Oct 25 '23 05:10 lilinrestart

前端的报错信息 图像

实体太大通常意味着👇

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

image 我设置的是1024m

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

lilinrestart avatar Oct 25 '23 05:10 lilinrestart