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] 目前上传文件中遇到的几个问题 #5036

Open
Kryo123456 opened this issue Dec 16, 2024 · 3 comments
Open

[Bug] 目前上传文件中遇到的几个问题 #5036

Kryo123456 opened this issue Dec 16, 2024 · 3 comments
Labels
🐛 Bug Something isn't working | 缺陷 files 上传文件/知识库 ⚡️ Performance Performance issue | 性能问题

Comments

@Kryo123456
Copy link

📦 部署环境

Vercel

📌 软件版本

1.36.25

💻 系统环境

Windows

🌐 浏览器

Chrome

🐛 问题描述

1.上传超过100m的pdf文件时,大概率会出现如图所示的错误,压缩pdf后由于文字模糊又容易出现识别文字错误的问题。
屏幕截图 2024-12-16 104601
2.在知识库页数较多的pdf文件(通常为某本书)时,会出现卡住然后无法预览的情况,也有时候会出现崩溃,如图所示。
屏幕截图 2024-12-16 113435

📷 复现步骤

基本都是与体积较大或者页数较多的pdf有关,上传和使用这类pdf非常容易出现这类问题。

🚦 期望结果

通过优化,能正常预览和上传体积较大或者页数较多的pdf。

📝 补充信息

我使用的是vercel的免费版所部署的服务器数据库模式,我不太清楚这是否与我配置较低有关。

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

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


📦 Deployment environment

Vercel

📌 Software version

1.36.25

💻 System environment

Windows

🌐 Browser

Chrome

🐛 Problem description

  1. When uploading a PDF file exceeding 100m, there will be a high probability of errors as shown in the picture. After compressing the PDF, text recognition errors are prone to occur due to blurred text.
    Screenshot 2024-12-16 104601
  2. When using a PDF file with a large number of knowledge base pages (usually a book), it will get stuck and cannot be previewed, and sometimes it will crash, as shown in the figure.
    Screenshot 2024-12-16 113435

📷 Steps to reproduce

Basically, it is related to PDFs that are larger in size or have more pages. It is very easy to have this kind of problem when uploading and using such PDFs.

🚦 Expected results

Through optimization, PDFs with larger sizes or more pages can be previewed and uploaded normally.

📝 Supplementary information

I am using the server database mode deployed by the free version of vercel. I am not sure whether this is related to my low configuration.

@lobehubbot
Copy link
Member

👀 @Kryo123456

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@dosubot dosubot bot added files 上传文件/知识库 ⚡️ Performance Performance issue | 性能问题 labels Dec 16, 2024
Copy link

dosubot bot commented Dec 16, 2024

I found a similar unsolved discussion that might be relevant to your issue: [Bug] 文件上传失败 分块失败, which was last updated on September 26, 2024 [1].

To address the issues you're experiencing with uploading and previewing large or multi-page PDF files on a Vercel-deployed application, consider the following strategies:

  1. Lazy Loading Pages: Implement lazy loading to load PDF pages on demand as the user scrolls. This reduces the initial load and can prevent the application from freezing or crashing.

  2. Optimize PDF.js Worker: Ensure the PDF.js worker is correctly configured and loaded from a reliable CDN. This can improve the performance of PDF rendering.

  3. Chunked Data Loading: Use chunked data loading to handle large files more efficiently. This involves loading data in smaller parts rather than all at once.

  4. Error Handling: Implement robust error handling to manage errors like "TaskTriggerError" gracefully. This might involve retrying operations or providing user feedback.

  5. Reduce Initial Load: Minimize the initial data and resources loaded by the application, such as deferring non-critical CSS and JavaScript.

These strategies should help improve performance and reduce errors when handling large PDF files [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 files 上传文件/知识库 ⚡️ Performance Performance issue | 性能问题
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

2 participants