langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
47.17k stars 6.7k forks source link

All OpenAI Models are not Connected #7373

Closed taowang1993 closed 1 month ago

taowang1993 commented 1 month ago

Self Checks

Dify version

0.7.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

OpenAI is not connected.

Other providers work fine. I tried Groq and OpenRouter.

Just OpenAI is not working.

The responsse does not load.

image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 1 month ago

The issue with OpenAI not connecting in the self-hosted (Docker) version 0.7.0 of Dify, while other providers like Groq and OpenRouter work fine, is likely due to the absence of ffmpeg, which is required for OpenAI's text-to-speech functionality.

To resolve this, you need to install ffmpeg on your system. Here are the steps for different operating systems:

Ubuntu:

  1. Open Terminal.
  2. Enter the following commands to install FFmpeg:
    sudo apt-get update
    sudo apt-get install ffmpeg
  3. Enter ffmpeg -version to check if the installation is successful.

Windows:

  1. Visit FFmpeg Official Website and download the precompiled Windows shared library.
  2. Download and extract the FFmpeg folder, which will generate a folder like "ffmpeg-20200715-51db0a4-win64-static".
  3. Move the extracted folder to your desired location, e.g., C:\Program Files\.
  4. Add the absolute path of the FFmpeg bin directory to the system environment variables.
  5. Open Command Prompt and enter ffmpeg -version. If you see the FFmpeg version information, the installation is successful.

Mac OS X:

  1. Open Terminal.
  2. If you haven't installed Homebrew, you can install it by entering the following command in Terminal:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Use Homebrew to install FFmpeg:
    brew install ffmpeg
  4. Enter ffmpeg -version to check if the installation is successful.

CentOS:

  1. First, enable the EPEL repository. Enter in Terminal:
    sudo yum install epel-release
  2. Then, enter:
    sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
  3. Update yum packages, enter:
    sudo yum update
  4. Finally, install FFmpeg, enter:
    sudo yum install ffmpeg ffmpeg-devel
  5. Enter ffmpeg -version to check if the installation is successful.

Additionally, ensure that the OPENAI_API_BASE environment variable is correctly set in your Docker environment. This variable should be set to the OpenAI base address, which defaults to https://api.openai.com/v1. If OpenAI cannot be accessed in your region, you may need to replace it with a local mirror address or a compatible API endpoint [1][2].

To continue talking to Dosu, mention @dosu.

taowang1993 commented 1 month ago

I tried deploying Dify on my local machine, and the OpenAI models are working.

But the the Dify instance on my VPS is not working well for OpenAI models.

taowang1993 commented 1 month ago

Here is my console log:

Failed to load resource: the server responded with a status of 502 () configuration:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON /console/api/apps/a5bbfde5-0ce1-43c2-a9d4-444f2816ef3c/chat-messages:1

   Failed to load resource: the server responded with a status of 502 ()

configuration:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON /console/api/apps/a5bbfde5-0ce1-43c2-a9d4-444f2816ef3c/chat-messages:1

   Failed to load resource: the server responded with a status of 502 ()

configuration:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON /console/api/apps/a5bbfde5-0ce1-43c2-a9d4-444f2816ef3c/chat-messages:1

   Failed to load resource: the server responded with a status of 524 ()

configuration:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON /console/api/apps/a5bbfde5-0ce1-43c2-a9d4-444f2816ef3c/chat-messages:1

   Failed to load resource: the server responded with a status of 502 ()

configuration:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON /console/api/apps/a5bbfde5-0ce1-43c2-a9d4-444f2816ef3c/chat-messages:1

   Failed to load resource: the server responded with a status of 502 ()
crazywoola commented 1 month ago

Please provide the container logs of api.

taowang1993 commented 1 month ago

Please provide the container logs of api.

root@Dify:~/dify/docker# docker logs docker-api-1
Running migrations
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.
INFO:matplotlib.font_manager:generated new fontManager
Preparing database migration...
Start database migration.
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> 64b051264f32, init
INFO  [alembic.runtime.migration] Running upgrade 64b051264f32 -> 9f4e3427ea84, add created by role
INFO  [alembic.runtime.migration] Running upgrade 9f4e3427ea84 -> a45f4dfde53b, add language to recommend apps
INFO  [alembic.runtime.migration] Running upgrade a45f4dfde53b -> 614f77cecc48, add last active at
INFO  [alembic.runtime.migration] Running upgrade 614f77cecc48 -> e32f6ccb87c6, e08af0a69ccefbb59fa80c778efee300bb780980
INFO  [alembic.runtime.migration] Running upgrade e32f6ccb87c6 -> d3d503a3471c, add is_deleted to conversations
INFO  [alembic.runtime.migration] Running upgrade d3d503a3471c -> a5b56fb053ef, app config add speech_to_text
INFO  [alembic.runtime.migration] Running upgrade a5b56fb053ef -> 2beac44e5f5f, add is_universal in apps
INFO  [alembic.runtime.migration] Running upgrade 2beac44e5f5f -> 7ce5a52e4eee, add tool providers
INFO  [alembic.runtime.migration] Running upgrade 7ce5a52e4eee -> 8d2d099ceb74, add_qa_model_support
INFO  [alembic.runtime.migration] Running upgrade 8d2d099ceb74 -> 16fa53d9faec, add provider model support
INFO  [alembic.runtime.migration] Running upgrade 16fa53d9faec -> e35ed59becda, modify quota limit field type
INFO  [alembic.runtime.migration] Running upgrade e35ed59becda -> bf0aec5ba2cf, add provider order
INFO  [alembic.runtime.migration] Running upgrade bf0aec5ba2cf -> 5022897aaceb, add model name in embedding
INFO  [alembic.runtime.migration] Running upgrade 5022897aaceb -> 2c8af9671032, add_qa_document_language
INFO  [alembic.runtime.migration] Running upgrade 2c8af9671032 -> e8883b0148c9, add_dataset_model_name
INFO  [alembic.runtime.migration] Running upgrade e8883b0148c9 -> 853f9b9cd3b6, add message price unit
INFO  [alembic.runtime.migration] Running upgrade 853f9b9cd3b6 -> 4bcffcd64aa4, update_dataset_model_field_null_available
INFO  [alembic.runtime.migration] Running upgrade 4bcffcd64aa4 -> 6dcb43972bdc, add_dataset_retriever_resource
INFO  [alembic.runtime.migration] Running upgrade 6dcb43972bdc -> 77e83833755c, add_app_config_retriever_resource
INFO  [alembic.runtime.migration] Running upgrade 77e83833755c -> 6e2cfb077b04, add_dataset_collection_binding
INFO  [alembic.runtime.migration] Running upgrade 6e2cfb077b04 -> ab23c11305d4, add dataset query variable at app model configs.
INFO  [alembic.runtime.migration] Running upgrade ab23c11305d4 -> 2e9819ca5b28, add_tenant_id_in_api_token
INFO  [alembic.runtime.migration] Running upgrade 2e9819ca5b28 -> b3a09c049e8e, add advanced prompt templates
INFO  [alembic.runtime.migration] Running upgrade b3a09c049e8e -> 968fff4c0ab9, add_api_based_extension
INFO  [alembic.runtime.migration] Running upgrade 968fff4c0ab9 -> a9836e3baeee, add external_data_tools in app model config
INFO  [alembic.runtime.migration] Running upgrade a9836e3baeee -> 8fe468ba0ca5, add gpt4v supports
INFO  [alembic.runtime.migration] Running upgrade 8fe468ba0ca5 -> fca025d3b60f, add-dataset-retrival-model
INFO  [alembic.runtime.migration] Running upgrade fca025d3b60f -> e1901f623fd0, add-annotation-reply
INFO  [alembic.runtime.migration] Running upgrade e1901f623fd0 -> 46976cc39132, add-annotation-histoiry-score
INFO  [alembic.runtime.migration] Running upgrade 46976cc39132 -> f2a6fc85e260, add_anntation_history_message_id
INFO  [alembic.runtime.migration] Running upgrade f2a6fc85e260 -> 714aafe25d39, add_anntation_history_match_response
INFO  [alembic.runtime.migration] Running upgrade 714aafe25d39 -> 246ba09cbbdb, add_app_anntation_setting
INFO  [alembic.runtime.migration] Running upgrade 246ba09cbbdb -> 88072f0caa04, add custom config in tenant
INFO  [alembic.runtime.migration] Running upgrade 88072f0caa04 -> 187385f442fc, modify provider model name length
INFO  [alembic.runtime.migration] Running upgrade 187385f442fc -> 89c7899ca936, empty message
INFO  [alembic.runtime.migration] Running upgrade 89c7899ca936 -> 3ef9b2b6bee6, add_assistant_app
INFO  [alembic.runtime.migration] Running upgrade 3ef9b2b6bee6 -> ad472b61a054, add api provider icon
INFO  [alembic.runtime.migration] Running upgrade ad472b61a054 -> 8ec536f3c800, rename api provider credentials
INFO  [alembic.runtime.migration] Running upgrade 8ec536f3c800 -> 00bacef91f18, rename api provider description
INFO  [alembic.runtime.migration] Running upgrade 00bacef91f18 -> f25003750af4, add created/updated at
INFO  [alembic.runtime.migration] Running upgrade f25003750af4 -> c71211c8f604, add tool_invoke_model_log
INFO  [alembic.runtime.migration] Running upgrade c71211c8f604 -> 114eed84c228, remove tool id from model invoke
INFO  [alembic.runtime.migration] Running upgrade 114eed84c228 -> 4829e54d2fee, change message chain id to nullable
INFO  [alembic.runtime.migration] Running upgrade 4829e54d2fee -> 053da0c1d756, add api tool privacy
INFO  [alembic.runtime.migration] Running upgrade 053da0c1d756 -> 4823da1d26cf, add tool file
INFO  [alembic.runtime.migration] Running upgrade 4823da1d26cf -> 9fafbd60eca1, add message file belongs to
INFO  [alembic.runtime.migration] Running upgrade 9fafbd60eca1 -> 8ae9bc661daa, add tool conversation variables idx
INFO  [alembic.runtime.migration] Running upgrade 8ae9bc661daa -> 23db93619b9d, add message files into agent thought
INFO  [alembic.runtime.migration] Running upgrade 23db93619b9d -> de95f5c77138, migration serpapi_api_key
INFO  [alembic.runtime.migration] Running upgrade de95f5c77138 -> b24be59fbb04, empty message
INFO  [alembic.runtime.migration] Running upgrade b24be59fbb04 -> dfb3b7f477da, add-tool-index
INFO  [alembic.runtime.migration] Running upgrade dfb3b7f477da -> 380c6aa5a70d, add tool labels to agent thought
INFO  [alembic.runtime.migration] Running upgrade 380c6aa5a70d -> 16830a790f0f, empty message
INFO  [alembic.runtime.migration] Running upgrade 16830a790f0f -> a8f9b3c45e4a, add_tenant_id_db_index
INFO  [alembic.runtime.migration] Running upgrade a8f9b3c45e4a -> 17b5ab037c40, add-keyworg-table-storage-type
INFO  [alembic.runtime.migration] Running upgrade 17b5ab037c40 -> a8d7385a7b66, add-embeddings-provider-name
INFO  [alembic.runtime.migration] Running upgrade a8d7385a7b66 -> b289e2408ee2, add workflow
INFO  [alembic.runtime.migration] Running upgrade b289e2408ee2 -> cc04d0998d4d, set model config column nullable
INFO  [alembic.runtime.migration] Running upgrade cc04d0998d4d -> f9107f83abab, add desc for apps
INFO  [alembic.runtime.migration] Running upgrade f9107f83abab -> 42e85ed5564d, conversation columns set nullable
INFO  [alembic.runtime.migration] Running upgrade 42e85ed5564d -> b5429b71023c, messages columns set nullable
INFO  [alembic.runtime.migration] Running upgrade b5429b71023c -> 563cf8bf777b, enable tool file without conversation id
INFO  [alembic.runtime.migration] Running upgrade 563cf8bf777b -> e2eacc9a1b63, add status for message
INFO  [alembic.runtime.migration] Running upgrade e2eacc9a1b63 -> c3311b089690, add tool meta
INFO  [alembic.runtime.migration] Running upgrade c3311b089690 -> 3c7cac9521c6, add-tags-and-binding-table
INFO  [alembic.runtime.migration] Running upgrade 3c7cac9521c6 -> 47cc7df8c4f3, modify default model name length
INFO  [alembic.runtime.migration] Running upgrade 47cc7df8c4f3 -> 5fda94355fce, Custom Disclaimer
INFO  [alembic.runtime.migration] Running upgrade 5fda94355fce -> 7bdef072e63a, add workflow tool
INFO  [alembic.runtime.migration] Running upgrade 7bdef072e63a -> 3b18fea55204, add tool label bings
INFO  [alembic.runtime.migration] Running upgrade 3b18fea55204 -> 9e98fbaffb88, add workflow tool version
INFO  [alembic.runtime.migration] Running upgrade 9e98fbaffb88 -> 03f98355ba0e, add workflow tool label and tool bindings idx
INFO  [alembic.runtime.migration] Running upgrade 03f98355ba0e -> 64a70a7aab8b, add workflow run index
INFO  [alembic.runtime.migration] Running upgrade 64a70a7aab8b -> 4e99a8df00ff, add load balancing
INFO  [alembic.runtime.migration] Running upgrade 4e99a8df00ff -> 7b45942e39bb, add-api-key-auth-binding
INFO  [alembic.runtime.migration] Running upgrade 7b45942e39bb -> 4ff534e1eb11, add workflow to site
INFO  [alembic.runtime.migration] Running upgrade 4ff534e1eb11 -> b69ca54b9208, add chatbot color theme
INFO  [alembic.runtime.migration] Running upgrade 4ff534e1eb11 -> 04c602f5dc9b, update AppModelConfig and add table TracingAppConfig
INFO  [alembic.runtime.migration] Running upgrade 04c602f5dc9b -> c031d46af369, remove app model config trace config and rename trace app config
INFO  [alembic.runtime.migration] Running upgrade c031d46af369 -> 2a3aebbbf4bb, add app tracing
INFO  [alembic.runtime.migration] Running upgrade 2a3aebbbf4bb, b69ca54b9208 -> 63f9175e515b, merge branches
INFO  [alembic.runtime.migration] Running upgrade 63f9175e515b -> b2602e131636, add workflow_run_id index for message
INFO  [alembic.runtime.migration] Running upgrade b2602e131636 -> 7e6a8693e07a, add table dataset_permissions
INFO  [alembic.runtime.migration] Running upgrade 7e6a8693e07a -> 161cadc1af8d, add dataset permission tenant id
INFO  [alembic.runtime.migration] Running upgrade 161cadc1af8d -> 408176b91ad3, 'add_max_active_requests'
INFO  [alembic.runtime.migration] Running upgrade 408176b91ad3 -> fecff1c3da27, remove extra tracing app config table and add idx_dataset_permissions_tenant_id
INFO  [alembic.runtime.migration] Running upgrade fecff1c3da27 -> 6e957a32015b, add-embedding-cache-created_at_index
INFO  [alembic.runtime.migration] Running upgrade 6e957a32015b -> 8e5588e6412e, add environment variable to workflow model
INFO  [alembic.runtime.migration] Running upgrade 8e5588e6412e -> 53bf8af60645, update model
INFO  [alembic.runtime.migration] Running upgrade 53bf8af60645 -> eeb2e349e6ac, increase max model_name length
INFO  [alembic.runtime.migration] Running upgrade eeb2e349e6ac -> 1787fbae959a, update tools original_url length
INFO  [alembic.runtime.migration] Running upgrade 1787fbae959a -> 63a83fcf12ba, support conversation variables
Database migration successful!
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-08-17 10:25:35 +0000] [1] [INFO] Starting gunicorn 22.0.0
[2024-08-17 10:25:35 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
[2024-08-17 10:25:35 +0000] [1] [INFO] Using worker: gevent
[2024-08-17 10:25:35 +0000] [22] [INFO] Booting worker with pid: 22
2024-08-17 10:34:02,027.027 INFO [Dummy-1] [_client.py:1026] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
2024-08-17 10:35:54,006.006 WARNING [Dummy-2] [app_dsl_service.py:196] - DSL version 0.1.0 is not compatible with current version 0.1.1, related to Dify version 0.6.0.
2024-08-17 10:36:21,072.072 WARNING [Dummy-3] [app_dsl_service.py:196] - DSL version 0.1.0 is not compatible with current version 0.1.1, related to Dify version 0.6.0.
[2024-08-17 10:36:26 +0000] [1] [ERROR] Worker (pid:20) exited with code 1
[2024-08-17 10:36:26 +0000] [1] [ERROR] Worker (pid:20) exited with code 1.
[2024-08-17 10:36:26 +0000] [1] [ERROR] Worker (pid:22) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:36:26 +0000] [35] [INFO] Booting worker with pid: 35
[2024-08-17 10:38:41 +0000] [1] [ERROR] Worker (pid:35) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:38:41 +0000] [37] [INFO] Booting worker with pid: 37
[2024-08-17 10:40:01 +0000] [1] [ERROR] Worker (pid:37) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:40:01 +0000] [39] [INFO] Booting worker with pid: 39
[2024-08-17 10:41:52 +0000] [1] [ERROR] Worker (pid:39) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:41:52 +0000] [41] [INFO] Booting worker with pid: 41
2024-08-17 10:42:06,100.100 INFO [Dummy-5] [_client.py:1026] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
[2024-08-17 10:43:29 +0000] [1] [ERROR] Worker (pid:41) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:43:29 +0000] [54] [INFO] Booting worker with pid: 54
[2024-08-17 10:45:52 +0000] [1] [ERROR] Worker (pid:54) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:45:52 +0000] [56] [INFO] Booting worker with pid: 56
2024-08-17 10:52:13,838.838 INFO [Dummy-7] [_client.py:1026] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
2024-08-17 10:52:19,931.931 INFO [Dummy-8] [_client.py:1026] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
[2024-08-17 10:52:40 +0000] [1] [ERROR] Worker (pid:56) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:52:40 +0000] [69] [INFO] Booting worker with pid: 69
[2024-08-17 10:53:27 +0000] [1] [ERROR] Worker (pid:69) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:53:27 +0000] [71] [INFO] Booting worker with pid: 71
[2024-08-17 10:56:52 +0000] [1] [ERROR] Worker (pid:71) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 10:56:52 +0000] [73] [INFO] Booting worker with pid: 73
[2024-08-17 11:00:34 +0000] [1] [ERROR] Worker (pid:73) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:00:34 +0000] [75] [INFO] Booting worker with pid: 75
[2024-08-17 11:00:52 +0000] [1] [ERROR] Worker (pid:75) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:00:52 +0000] [77] [INFO] Booting worker with pid: 77
2024-08-17 11:01:38,840.840 INFO [Dummy-12] [_client.py:1026] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
[2024-08-17 11:01:47 +0000] [1] [ERROR] Worker (pid:77) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:01:47 +0000] [90] [INFO] Booting worker with pid: 90
[2024-08-17 11:02:08 +0000] [1] [ERROR] Worker (pid:90) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:02:08 +0000] [92] [INFO] Booting worker with pid: 92
[2024-08-17 11:03:00 +0000] [1] [ERROR] Worker (pid:92) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:03:00 +0000] [103] [INFO] Booting worker with pid: 103
[2024-08-17 11:04:02 +0000] [1] [ERROR] Worker (pid:103) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:04:02 +0000] [114] [INFO] Booting worker with pid: 114
[2024-08-17 11:05:15 +0000] [1] [ERROR] Worker (pid:114) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:05:15 +0000] [116] [INFO] Booting worker with pid: 116
[2024-08-17 11:05:34 +0000] [1] [ERROR] Worker (pid:116) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:05:34 +0000] [118] [INFO] Booting worker with pid: 118
[2024-08-17 11:09:58 +0000] [1] [ERROR] Worker (pid:118) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:09:58 +0000] [129] [INFO] Booting worker with pid: 129
[2024-08-17 11:11:01 +0000] [1] [ERROR] Worker (pid:129) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:11:01 +0000] [131] [INFO] Booting worker with pid: 131
[2024-08-17 11:13:26 +0000] [1] [ERROR] Worker (pid:131) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:13:26 +0000] [133] [INFO] Booting worker with pid: 133
2024-08-17 11:16:31,555.555 INFO [Dummy-21] [_client.py:1026] - HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 400 Bad Request"
2024-08-17 11:22:46,321.321 INFO [Dummy-22] [_client.py:1026] - HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 200 OK"
2024-08-17 11:23:14,786.786 INFO [Thread-25 (_generate_worker)] [_client.py:1026] - HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 200 OK"
[2024-08-17 11:23:45 +0000] [1] [ERROR] Worker (pid:133) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:23:45 +0000] [146] [INFO] Booting worker with pid: 146
2024-08-17 11:24:29,204.204 INFO [Dummy-22] [_client.py:1026] - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
[2024-08-17 11:38:05 +0000] [1] [ERROR] Worker (pid:146) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:38:05 +0000] [159] [INFO] Booting worker with pid: 159
[2024-08-17 11:39:34 +0000] [1] [ERROR] Worker (pid:159) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:39:35 +0000] [170] [INFO] Booting worker with pid: 170
[2024-08-17 11:44:32 +0000] [1] [ERROR] Worker (pid:170) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:44:32 +0000] [181] [INFO] Booting worker with pid: 181
[2024-08-17 11:44:36 +0000] [1] [ERROR] Worker (pid:181) was sent SIGKILL! Perhaps out of memory?
[2024-08-17 11:44:36 +0000] [183] [INFO] Booting worker with pid: 183
2024-08-17 11:46:42,472.472 INFO [Thread-28 (_generate_worker)] [_client.py:1026] - HTTP Request: POST https://api.anthropic.com/v1/messages "HTTP/1.1 200 OK"
akramer-zibra commented 1 month ago

@taowang1993 seems your VPS does not have enough RAM to run dify's worker service properly: [2024-08-17 10:43:29 +0000] [1] [ERROR] Worker (pid:41) was sent SIGKILL! Perhaps out of memory?

Could this be the issue? you may use htop on linux server to get insight in the cpu, ram etc. usage of your VPS

taowang1993 commented 1 month ago

Thanks! Problem solved.

I scaled up the vps. Didn't realized it need this much RAM.

image