Local Source Code add models Gateway Time out 504 #10548

Closed
opened 2026-02-21 18:48:15 -05:00 by yindo · 0 comments
Owner

Originally created by @Planetsu on GitHub (Mar 12, 2025).

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

v1.0.0

Cloud or Self Hosted

Cloud, Self Hosted (Source)

Steps to reproduce

On the Ubuntu Cloud, I run both front-end and back-end

  1. The front-end default request localhost: 5001, so I use nginx to turn internal requests to the Extranet: Port 90 forwarded to 5001, and the project logged in [normally]
  2. add all models Error Gateway Time out 504
  3. back api error log
    `2025-03-1207:11:26,534 INFO [_internal.py:97] 127.0.0.1-- [12/Mar/2025 07:11:26] "GET /console/api/setup HTTP/1.0"200-
2025-03-1207:11:27,316 INFO [internal.py:97] 127.0.0.1--[12/Mar/2025 07:11:27] "OPTIONS /console/api/system-features HTTP/1.0"200- 2025-03-1207:11:27,408 INFO [internal.py:97] 127.0.0.1--[12/Mar/2025 07:11:27] "GET /console/api/system-features HTTP/1.0"200-

2025-03-1207:12:36,227 EROR [app.py:875] a1dd137ab7 Exception on /console/api/workspaces/current/model-providers/langgenius/volcengine_maas/volcengine_mas/models [POST] Traceback (most recent call last):

File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv self. dispatch request()

File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask/app. py", line 902, in dispatch request return self. ensure_sync(self. view_functions[rule. endpo int])( **view_args) type: ignore[no-any-return] File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask_restful/_init_.py", line 489, in wrapper resp = resource(*args, **kwargs)

File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) #type: ignore[no-any-return]

File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask_restful/_init_.py", line 604, in dispatch_request resp meth( *args, **kwargs)

File "/home/ubuntu/dify/api/controllers/console/wraps.py", line 187, in decorated return view(*args, **kwargs)

File "/home/ubuntu/dify/api/libs/login. py", line 94, in decorated_view return current_app. ensure_sync(func)(*args, *kwargs)

File "/home/ubuntu/dify/api/controllers/console/wraps.py", line 30, in decorated return view(*args, *kwargs)

File "/home/ubuntu/dify/api/controllers/console/workspace/models. py", line 154, in post model provider service. save model credentials(

File "/home/ubuntu/dify/api/services/model provider service. py", line 237, in save model credentials provider configuration. add or update custom model credentials(

File "/home/ubuntu/dify/api/core/entities/provider configuration. py", line 422, in add or update custom model credentials provider_model_record,credentials=self.custom_model_credentials_validate(model_type, model,credentials)

File "/home/ubuntu/dify/api/core/entities/provider_configuration. py", line 402, in custom_model_credentials_validate credentials model_provider_factory. model_credentials_validate(

File "/home/ubuntu/dify/api/core/model runtime/model providers/model provider factory. py", line 191, in model credentials validate self. plugin model manager. validate model credentials(

File "/home/ubuntu/dify/api/core/plugin/manager/model. py", line 137, in validate_model_credentials for resp in response:


File "/home/ubuntu/dify/api/core/plugin/manager/base. py", line 189, in _request_with_plugin_daemon_response_stream self. handle plugin daemon error(error. error type, error. message)

File "/home/ubuntu/dify/api/core/plugin/manager/base. py", line 223, in handle plugin daemon error raise Plug inDaemonInternalServerError(description=message)

core.plugin. manager. exc. PluginDaemonInternalServerError: PluginDaemonInternalServerError: killed by timeout

2025-03-1207:12:36,230 INFO [ internal.py:97]127.0.0.1--[12/Mar/202507:12:36]"P0ST /console/api/workspaces/current/model-providers/langgenius/volcengine _mas/volcengin maas/models HTTP/1.0" 500-`

✔️ Expected Behavior

success

Actual Behavior

Gateway Time out 504

Originally created by @Planetsu on GitHub (Mar 12, 2025). ### 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 v1.0.0 ### Cloud or Self Hosted Cloud, Self Hosted (Source) ### Steps to reproduce On the Ubuntu Cloud, I run both front-end and back-end 1. The front-end default request localhost: 5001, so I use nginx to turn internal requests to the Extranet: Port 90 forwarded to 5001, and the project logged in [normally] 2. add all models Error Gateway Time out 504 3. back api error log `2025-03-1207:11:26,534 INFO [_internal.py:97] 127.0.0.1-- [12/Mar/2025 07:11:26] "GET /console/api/setup HTTP/1.0"200- ``` 2025-03-1207:11:27,316 INFO [internal.py:97] 127.0.0.1--[12/Mar/2025 07:11:27] "OPTIONS /console/api/system-features HTTP/1.0"200- 2025-03-1207:11:27,408 INFO [internal.py:97] 127.0.0.1--[12/Mar/2025 07:11:27] "GET /console/api/system-features HTTP/1.0"200- 2025-03-1207:12:36,227 EROR [app.py:875] a1dd137ab7 Exception on /console/api/workspaces/current/model-providers/langgenius/volcengine_maas/volcengine_mas/models [POST] Traceback (most recent call last): File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask/app.py", line 917, in full_dispatch_request rv self. dispatch request() File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask/app. py", line 902, in dispatch request return self. ensure_sync(self. view_functions[rule. endpo int])( **view_args) type: ignore[no-any-return] File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask_restful/_init_.py", line 489, in wrapper resp = resource(*args, **kwargs) File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) #type: ignore[no-any-return] File "/home/ubuntu/dify/api/. venv/lib/python3.12/site-packages/flask_restful/_init_.py", line 604, in dispatch_request resp meth( *args, **kwargs) File "/home/ubuntu/dify/api/controllers/console/wraps.py", line 187, in decorated return view(*args, **kwargs) File "/home/ubuntu/dify/api/libs/login. py", line 94, in decorated_view return current_app. ensure_sync(func)(*args, *kwargs) File "/home/ubuntu/dify/api/controllers/console/wraps.py", line 30, in decorated return view(*args, *kwargs) File "/home/ubuntu/dify/api/controllers/console/workspace/models. py", line 154, in post model provider service. save model credentials( File "/home/ubuntu/dify/api/services/model provider service. py", line 237, in save model credentials provider configuration. add or update custom model credentials( File "/home/ubuntu/dify/api/core/entities/provider configuration. py", line 422, in add or update custom model credentials provider_model_record,credentials=self.custom_model_credentials_validate(model_type, model,credentials) File "/home/ubuntu/dify/api/core/entities/provider_configuration. py", line 402, in custom_model_credentials_validate credentials model_provider_factory. model_credentials_validate( File "/home/ubuntu/dify/api/core/model runtime/model providers/model provider factory. py", line 191, in model credentials validate self. plugin model manager. validate model credentials( File "/home/ubuntu/dify/api/core/plugin/manager/model. py", line 137, in validate_model_credentials for resp in response: File "/home/ubuntu/dify/api/core/plugin/manager/base. py", line 189, in _request_with_plugin_daemon_response_stream self. handle plugin daemon error(error. error type, error. message) File "/home/ubuntu/dify/api/core/plugin/manager/base. py", line 223, in handle plugin daemon error raise Plug inDaemonInternalServerError(description=message) core.plugin. manager. exc. PluginDaemonInternalServerError: PluginDaemonInternalServerError: killed by timeout 2025-03-1207:12:36,230 INFO [ internal.py:97]127.0.0.1--[12/Mar/202507:12:36]"P0ST /console/api/workspaces/current/model-providers/langgenius/volcengine _mas/volcengin maas/models HTTP/1.0" 500-` ``` ### ✔️ Expected Behavior success ### ❌ Actual Behavior Gateway Time out 504
yindo added the 🐞 bug label 2026-02-21 18:48:15 -05:00
yindo closed this issue 2026-02-21 18:48:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#10548