Open liduang opened 6 days ago
@liduang Hello there! I'm here to help you with any issues or questions you have regarding the repository. I can assist you in solving bugs, answering questions, or becoming a contributor.
To address the issue of the docker-api-1
container causing the system CPU usage to reach 100% during recall tests, you can try the following steps:
Check Resource Limits: Ensure that the docker-api-1
container has appropriate resource limits set in the docker-compose.yml
file. You can limit the CPU usage by adding the cpus
option.
services:
docker-api-1:
image: your-image
deploy:
resources:
limits:
cpus: '0.50'
Optimize the Application: Investigate the application running inside the docker-api-1
container to identify any performance bottlenecks or inefficient code that could be causing high CPU usage.
Monitor and Debug: Use Docker's built-in tools to monitor the container's resource usage and debug the issue.
docker stats docker-api-1
Check Logs: Review the logs of the docker-api-1
container to identify any errors or warnings that might indicate the cause of the high CPU usage.
docker logs docker-api-1
Scale the Service: If the high CPU usage is due to high load, consider scaling the service to distribute the load across multiple instances.
docker-compose up --scale docker-api-1=3 -d
Additionally, during recall tests, specific functionalities such as choosing retrieval strategies, debugging TopK and recall score thresholds, and calculating similarity scores can be CPU-intensive. Adjusting these parameters might help reduce CPU usage [1][2].
By following these steps, you should be able to identify and mitigate the issue causing the docker-api-1
container to use excessive CPU resources.
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.6.8
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When performing recall tests, docker-api-1 caused the system CPU usage to reach 100%.
✔️ Expected Behavior
No response
❌ Actual Behavior
No response