Closed wmcde closed 1 month ago
Hello @wmcde! I'm here to help you with any bugs, questions, or contributions related to DiFY. Let me know how I can assist you!
To address the issue of uploading large PDF files disrupting other users' access in DiFY version 0.6.15, you can tweak several configuration settings to optimize resource usage and improve server performance. Here are the steps you can follow:
Here is an example configuration for your docker-compose.yaml
file:
services:
api:
environment:
SERVER_WORKER_AMOUNT: "8" # Adjust based on CPU cores (e.g., 4 cores x 2 + 1)
GUNICORN_TIMEOUT: "360" # Increase timeout to support longer connections
SQLALCHEMY_POOL_SIZE: "50" # Increase connection pool size if needed
CELERY_WORKER_AMOUNT: "4" # Increase the number of Celery workers if needed
UPLOAD_FILE_SIZE_LIMIT: "100MB" # Example value, adjust as necessary
UPLOAD_FILE_BATCH_LIMIT: "10" # Example value, adjust as necessary
Optimize Resource Allocation:
SERVER_WORKER_AMOUNT
based on the number of CPU cores. The recommended formula is CPU core count x 2 + 1
.SQLALCHEMY_POOL_SIZE
and CELERY_WORKER_AMOUNT
based on the workload and server capacity.Monitor Performance:
By making these adjustments, you can improve the server's ability to handle large file uploads and maintain uninterrupted access for all users [1][2].
To continue talking to Dosu, mention @dosu.
@takatost Could you take a look at this one?
Self Checks
Dify version
0.6.15
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
I deployed DiFY on a local server using Docker, running on Ubuntu 22 with an Intel Xeon Gold 5320*2 CPU, and 256GB of memory. I encountered an issue where uploading approximately ten PDF files, each roughly 10 megabytes in size (totalling approximately 100 megabytes) to the knowledge base takes a significant amount of time; during this period, other users are unable to access DiFY normally. Upon checking the server, I found that system resource usage was at typical levels; only a few CPU cores were at 100% utilization while most remained underutilized. Is there an issue with how DiFY is configured for resource consumption? How should I tweak the configuration settings to maximize server performance and ensure uninterrupted access for all users?
✔️ Expected Behavior
No response
❌ Actual Behavior
No response