Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] database版知识库不能正常分块 #3623

Closed
chung1912 opened this issue Aug 27, 2024 · 7 comments
Closed

[Bug] database版知识库不能正常分块 #3623

chung1912 opened this issue Aug 27, 2024 · 7 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@chung1912
Copy link
Contributor

📦 部署环境

Docker

📌 软件版本

v1.12.20(Database版)

💻 系统环境

Other Linux

🌐 浏览器

Chrome

🐛 问题描述

database版知识库不能正常分块,上传的是pdf文件,提示超时
image

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

@chung1912 chung1912 added the 🐛 Bug Something isn't working | 缺陷 label Aug 27, 2024
@github-project-automation github-project-automation bot moved this to Roadmap - Chat 1.x in Lobe Chat Routine Aug 27, 2024
@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


📦 Deployment environment

Docker

📌 Software version

v1.12.20(Database version)

💻 System environment

Other Linux

🌐 Browser

Chrome

🐛 Problem description

The database version of the knowledge base cannot be divided into blocks normally. The PDF file uploaded is timed out.
image

📷 Steps to reproduce

No response

🚦 Expected results

No response

📝 Supplementary information

No response

@lobehubbot
Copy link
Member

👀 @chung1912

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@chung1912 chung1912 changed the title [Bug] [Bug] database版知识库不能正常分块 Aug 27, 2024
Copy link

dosubot bot commented Aug 27, 2024

@chung1912 你好!我是Dosu,一个能够帮助你解决bug、回答问题并成为贡献者的机器人。我会在等待人类维护者的时候帮助你。

I found a similar closed issue: [Bug] 上传文件分块失败. The issue was resolved by adding a layer of internal authentication during deployment, which caused the server's RPC call to fail. The specific solution involved configuring the APP_URL to ensure that the server program could access it directly, bypassing any additional authentication layers.

For your specific issue with the "[TaskTimeout]: chunking task is timeout, please try again" error when uploading a PDF file, you need to increase the ASYNC_TASK_TIMEOUT value. This value determines the maximum time allowed for the chunking task to complete before it times out.

In the provided code, the ASYNC_TASK_TIMEOUT is used in a setTimeout function to reject the task if it takes too long:

const timeoutPromise = new Promise((_, reject) => {
  setTimeout(() => {
    reject({
      body: { detail: 'chunking task is timeout, please try again' },
      name: AsyncTaskErrorType.Timeout,
    } as AsyncTaskError);
  }, ASYNC_TASK_TIMEOUT);
});

To increase the timeout, locate the ASYNC_TASK_TIMEOUT definition in your configuration and set it to a higher value. For example, if it is currently set to 30000 milliseconds (30 seconds), you might increase it to 60000 milliseconds (60 seconds) or more, depending on your needs.

Here is an example of how you might change the timeout value:

const ASYNC_TASK_TIMEOUT = 60000; // Increase timeout to 60 seconds

Make sure to update this value in the appropriate configuration file or environment variable where ASYNC_TASK_TIMEOUT is defined [1].

To continue talking to Dosu, mention @dosu.

@arvinxx
Copy link
Contributor

arvinxx commented Aug 27, 2024

@chung1912 能否看下你的服务端日志,超时的问题可能有两种:

  1. 你的 chunk 端口被保护了导致无法正常请求;
  2. 你的 s3 文件没有被正常 fetch 到

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@chung1912 Can you take a look at your server log? There may be two types of timeout issues:

  1. Your chunk port is protected and cannot be requested normally;
  2. Your s3 file is not fetched normally.

@chung1912
Copy link
Contributor Author

chung1912 commented Aug 27, 2024

@chung1912 能否看下你的服务端日志,超时的问题可能有两种:

  1. 你的 chunk 端口被保护了导致无法正常请求;
  2. 你的 s3 文件没有被正常 fetch 到

image

s3是minio部署的,可以正常上传、下载、删除图片和文件

@github-project-automation github-project-automation bot moved this from Roadmap - Chat 1.x to Done in Lobe Chat Routine Aug 27, 2024
@lobehubbot
Copy link
Member

@chung1912

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Archived in project
Development

No branches or pull requests

3 participants