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

Optimize parallel file processing in folder scan and fix dead lock problem in Gunicorn multi workers mode #1145

Merged
merged 7 commits into from
Mar 21, 2025

Conversation

danielaskdd
Copy link
Collaborator

Description

Optimize parallel file processing in folder scan and fix dead lock problem in Gunicorn multi workers mode

Related Issues

n/a

Changes Made

  • Enqueue files to pipeline batch by batch to utilize parallel documents processing ability of the index stage
  • Changed parallel enqueue to sequential to prevent CPU overload by heavy file extraction jobs
  • Resolve dead lock problem which occur in parallel documents processing with Gunicorn mode
  • Prioritize OS environment variables over .env file to improve Docker compatibility for the server
  • Increased default timeout values for Gunicorn configuration

Checklist

  • Changes tested locally
  • Code reviewed
  • Documentation updated (if necessary)
  • Unit tests added (if applicable)

- Enqueue all files to pipeline before starting process when scanning input folder
- Changed parallel enqueue to sequential to prevent CPU overload by heavy file extraction jobs
- Doubled default timeout to 300 seconds
Add auxiliary async locks in multiprocess mode to prevent event loop blocking
@danielaskdd danielaskdd merged commit 58f8c76 into HKUDS:main Mar 21, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant