Closed jonzha9527 closed 2 days ago
Hey, @jonzha9527! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's squash those bugs together!
I couldn't find any specific issues related to Dify version 0.9.2 that could cause the API service to restart. However, there are a few things you might want to consider:
Missing Dependencies: The logs indicate that PyTorch, TensorFlow, or Flax are not found. This might be causing issues if your application relies on these libraries. Ensure that these dependencies are installed in your Docker environment if they are required for your application.
Resource Constraints: High CPU usage by Celery and Gunicorn could indicate that the system is under heavy load or not properly configured. Make sure your system meets the minimum requirements: at least 2 CPU cores and 4GB of RAM. For macOS, it's recommended to allocate at least 2 virtual CPUs and 8GB of memory to Docker [1][2].
Configuration Issues: Check your Docker Compose and environment variable configurations. Ensure that the number of workers for Gunicorn and Celery is set appropriately for your system's resources. Celery and Gunicorn configurations can significantly impact CPU usage [3][4].
Entrypoint Script: The error /entrypoint.sh: line 8: 7 Killed flask upgrade-db
suggests that the flask upgrade-db
command is being killed, possibly due to resource constraints. You might want to investigate why this command is failing and ensure that your database is properly configured and accessible.
If these suggestions do not resolve the issue, you might want to look into similar discussions or issues for additional insights. For example, there is a closed issue related to Docker upgrade run errors that might provide some context [5].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.9.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Docker Compose version v2.21.0 docker compose start api service, and console log as below:
✔️ Expected Behavior
api serivce running normally
❌ Actual Behavior
api service restart again and again, cpu be used by celery and gunicorn more than 50%.