dify can not start up,this is api log,please help me #7317

Closed
opened 2026-02-21 18:19:58 -05:00 by yindo · 1 comment
Owner

Originally created by @taomingyaojing on GitHub (Dec 20, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.13.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

2024-12-20 11:19:00 Running migrations
2024-12-20 11:19:39 2024-12-20 03:19:39.148 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
2024-12-20 11:20:19 2024-12-20 03:20:19.666 INFO [pre_load_builtin_providers_cache] [font_manager.py:1578] - generated new fontManager
2024-12-20 11:25:01 Running migrations
2024-12-20 11:19:19 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2024-12-20 11:19:49 /app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:5634: SyntaxWarning: invalid escape sequence '_'
2024-12-20 11:19:49 """function名称,只能包含a-z,A-Z,0-9,_或-
2024-12-20 11:19:52 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:19:52 re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&.%-]+)", re.U)
2024-12-20 11:19:52 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s'
2024-12-20 11:19:52 re_skip_default = re.compile("(\r\n|\s)", re.U)
2024-12-20 11:19:52 /app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:19:52 re_skip = re.compile("([a-zA-Z0-9]+(?:.\d+)?%?)")
2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:19:55 re_skip_detail = re.compile("([.0-9]+|[a-zA-Z0-9]+)")
2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:19:55 re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&.
]+)")
2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s'
2024-12-20 11:19:55 re_skip_internal = re.compile("(\r\n|\s)")
2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:19:55 re_num = re.compile("[.0-9]+")
2024-12-20 11:25:05 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2024-12-20 11:25:08 2024-12-20 03:25:08.905 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.

✔️ Expected Behavior

success :
2024-12-20 11:07:30 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2024-12-20 11:07:37 /app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:5634: SyntaxWarning: invalid escape sequence '_'
2024-12-20 11:07:37 """function名称,只能包含a-z,A-Z,0-9,_或-
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:07:38 re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&.%-]+)", re.U)
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s'
2024-12-20 11:07:38 re_skip_default = re.compile("(\r\n|\s)", re.U)
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:07:38 re_skip = re.compile("([a-zA-Z0-9]+(?:.\d+)?%?)")
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:07:38 re_skip_detail = re.compile("([.0-9]+|[a-zA-Z0-9]+)")
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:07:38 re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&.
]+)")
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s'
2024-12-20 11:07:38 re_skip_internal = re.compile("(\r\n|\s)")
2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '.'
2024-12-20 11:07:38 re_num = re.compile("[.0-9]+")
2024-12-20 11:07:47 INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
2024-12-20 11:07:47 INFO [alembic.runtime.migration] Will assume transactional DDL.
2024-12-20 11:07:51 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [1] [INFO] Starting gunicorn 22.0.0
2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [1] [INFO] Using worker: gevent
2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [127] [INFO] Booting worker with pid: 127
2024-12-20 11:07:27 Running migrations
2024-12-20 11:07:34 2024-12-20 03:07:34.623 INFO [MainThread] [utils.py:148] - Note: NumExpr detected 24 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
2024-12-20 11:07:34 2024-12-20 03:07:34.623 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
2024-12-20 11:07:43 2024-12-20 03:07:43.440 INFO [pre_load_builtin_providers_cache] [font_manager.py:1578] - generated new fontManager
2024-12-20 11:07:47 Preparing database migration...
2024-12-20 11:07:47 Starting database migration.
2024-12-20 11:07:47 Database migration successful!
2024-12-20 11:07:52 2024-12-20 03:07:52.781 INFO [MainThread] [utils.py:148] - Note: NumExpr detected 24 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
2024-12-20 11:07:52 2024-12-20 03:07:52.781 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads.
2024-12-20 11:38:47 2024-12-20 03:38:47.881 WARNING [Dummy-1] [version.py:37] - Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.13.2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))).

��� Actual Behavior

fist:same docker iamges
tow: one windows up success,other windows docker failed
why ?

Originally created by @taomingyaojing on GitHub (Dec 20, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.13.2 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 2024-12-20 11:19:00 Running migrations 2024-12-20 11:19:39 2024-12-20 03:19:39.148 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads. 2024-12-20 11:20:19 2024-12-20 03:20:19.666 INFO [pre_load_builtin_providers_cache] [font_manager.py:1578] - generated new fontManager 2024-12-20 11:25:01 Running migrations 2024-12-20 11:19:19 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. 2024-12-20 11:19:49 /app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:5634: SyntaxWarning: invalid escape sequence '\_' 2024-12-20 11:19:49 """function名称,只能包含a-z,A-Z,0-9,\_或- 2024-12-20 11:19:52 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:19:52 re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U) 2024-12-20 11:19:52 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s' 2024-12-20 11:19:52 re_skip_default = re.compile("(\r\n|\s)", re.U) 2024-12-20 11:19:52 /app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:19:52 re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)") 2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:19:55 re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)") 2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:19:55 re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)") 2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s' 2024-12-20 11:19:55 re_skip_internal = re.compile("(\r\n|\s)") 2024-12-20 11:19:55 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:19:55 re_num = re.compile("[\.0-9]+") 2024-12-20 11:25:05 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. 2024-12-20 11:25:08 2024-12-20 03:25:08.905 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads. ### ✔️ Expected Behavior success : 2024-12-20 11:07:30 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. 2024-12-20 11:07:37 /app/api/.venv/lib/python3.12/site-packages/tencentcloud/hunyuan/v20230901/models.py:5634: SyntaxWarning: invalid escape sequence '\_' 2024-12-20 11:07:37 """function名称,只能包含a-z,A-Z,0-9,\_或- 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:07:38 re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U) 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s' 2024-12-20 11:07:38 re_skip_default = re.compile("(\r\n|\s)", re.U) 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:07:38 re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)") 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:07:38 re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)") 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:07:38 re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)") 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s' 2024-12-20 11:07:38 re_skip_internal = re.compile("(\r\n|\s)") 2024-12-20 11:07:38 /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '\.' 2024-12-20 11:07:38 re_num = re.compile("[\.0-9]+") 2024-12-20 11:07:47 INFO [alembic.runtime.migration] Context impl PostgresqlImpl. 2024-12-20 11:07:47 INFO [alembic.runtime.migration] Will assume transactional DDL. 2024-12-20 11:07:51 None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used. 2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [1] [INFO] Starting gunicorn 22.0.0 2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1) 2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [1] [INFO] Using worker: gevent 2024-12-20 11:08:01 [2024-12-20 03:08:01 +0000] [127] [INFO] Booting worker with pid: 127 2024-12-20 11:07:27 Running migrations 2024-12-20 11:07:34 2024-12-20 03:07:34.623 INFO [MainThread] [utils.py:148] - Note: NumExpr detected 24 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. 2024-12-20 11:07:34 2024-12-20 03:07:34.623 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads. 2024-12-20 11:07:43 2024-12-20 03:07:43.440 INFO [pre_load_builtin_providers_cache] [font_manager.py:1578] - generated new fontManager 2024-12-20 11:07:47 Preparing database migration... 2024-12-20 11:07:47 Starting database migration. 2024-12-20 11:07:47 Database migration successful! 2024-12-20 11:07:52 2024-12-20 03:07:52.781 INFO [MainThread] [utils.py:148] - Note: NumExpr detected 24 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. 2024-12-20 11:07:52 2024-12-20 03:07:52.781 INFO [MainThread] [utils.py:160] - NumExpr defaulting to 8 threads. 2024-12-20 11:38:47 2024-12-20 03:38:47.881 WARNING [Dummy-1] [version.py:37] - Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.13.2 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1000)'))). ### ��� Actual Behavior fist:same docker iamges tow: one windows up success,other windows docker failed why ?
yindo added the 🐞 bug🤔 cant-reproduce labels 2026-02-21 18:19:58 -05:00
yindo closed this issue 2026-02-21 18:19:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Dec 20, 2024):

Hey there, @taomingyaojing! 👋 I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's squash those bugs together!

I found a similar closed issue where users experienced long startup times with the Dify API Docker service. The suggested solutions were:

  1. Ensure that all necessary dependencies like PyTorch, TensorFlow, and Flax are installed and properly configured, as missing dependencies can affect the service startup.
  2. Check the MIGRATION_ENABLED environment variable to ensure it is set to 'true', as migrations are executed before the application starts, and delays can occur if migrations are extensive or if there are database connection issues.
  3. Consider using a high-performance computer to reduce startup time.
  4. Upgrade to the latest version, as users reported that the issue was resolved in newer versions [1].

In your case, it seems that the absence of PyTorch, TensorFlow, or Flax is noted in the logs, which might be causing the startup issues. Ensure these dependencies are installed and accessible in your Docker environment. Additionally, verify that your system meets the recommended requirements for running Dify in a self-hosted Docker setup, which includes a CPU with 2 cores or more and at least 4 GiB of RAM [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Dec 20, 2024): <!-- Greeting --> Hey there, @taomingyaojing! 👋 I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's squash those bugs together! <!-- Answer --> I found a similar closed issue where users experienced long startup times with the Dify API Docker service. The suggested solutions were: 1. Ensure that all necessary dependencies like PyTorch, TensorFlow, and Flax are installed and properly configured, as missing dependencies can affect the service startup. 2. Check the `MIGRATION_ENABLED` environment variable to ensure it is set to `'true'`, as migrations are executed before the application starts, and delays can occur if migrations are extensive or if there are database connection issues. 3. Consider using a high-performance computer to reduce startup time. 4. Upgrade to the latest version, as users reported that the issue was resolved in newer versions <sup>[[1]](https://github.com/langgenius/dify/issues/9755)</sup>. In your case, it seems that the absence of PyTorch, TensorFlow, or Flax is noted in the logs, which might be causing the startup issues. Ensure these dependencies are installed and accessible in your Docker environment. Additionally, verify that your system meets the recommended requirements for running Dify in a self-hosted Docker setup, which includes a CPU with 2 cores or more and at least 4 GiB of RAM <sup>[[2]](https://github.com/langgenius/dify/blob/main/README.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/ac910b53-43de-4064-9270-ebe4853a747a?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/ac910b53-43de-4064-9270-ebe4853a747a?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/ac910b53-43de-4064-9270-ebe4853a747a?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/ac910b53-43de-4064-9270-ebe4853a747a?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/ac910b53-43de-4064-9270-ebe4853a747a?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/ac910b53-43de-4064-9270-ebe4853a747a?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7317