-
Notifications
You must be signed in to change notification settings - Fork 1k
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
uploading a PDF with many pages (for example, more than 20 pages) to Chainlit, the Chainlit page may become unresponsive #1558
Comments
@seleniumpython2016 Thanks for the feedback. Could it be that your OCR code is not running in async? |
Does this problem also occur when you're not doing OCR? In that case, the problem is the OCR (probably it not being async), not with chainlit. If it still persists, love to hear what's happening in the browser (e.g. profiling, console log etc.). |
@dokterbob I used async OCR 。because the page was dead. In the background, I saw 'connection closed'. When I refreshed the page, the data replied by the big model had already been released |
@dokterbob I guess the session timed out? May I ask how long the default session time is? How to set the timeout for this session? |
@dosu what do you think ? |
The default session timeout for Chainlit is 3600 seconds. You can adjust the session timeout by configuring the [project]
session_timeout = <desired_timeout_in_seconds> This should help you manage session timeouts more effectively, especially if your operations, like OCR and embedding, take a significant amount of time [1]. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
My guess is that your embedding step is taking a long time (which is fine) but is using synchronous code (which is not fine). check https://docs.chainlit.io/guides/sync-async |
Describe the bug
When uploading a PDF with many pages (for example, more than 20 pages) to Chainlit, the Chainlit page may become unresponsive during the process of embedding the content into the vector database if it takes a long time. You may need to refresh the page to continue.
To Reproduce
Steps to reproduce the behavior:
Screenshots
Desktop (please complete the following information):
chainlit ==1.3.1
The text was updated successfully, but these errors were encountered: