gevent.exceptions.BlockingSwitchOutError #15390

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

Originally created by @liuxin638507 on GitHub (Jul 15, 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

1.6.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

docker logs docker_api_1
Running migrations
2025-07-15 02:51:13.720 INFO [MainThread] [utils.py:164] - NumExpr defaulting to 16 threads.
Preparing database migration...
Starting database migration.
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
Database migration successful!
[2025-07-15 02:51:23 +0000] [1] [INFO] Starting gunicorn 23.0.0
[2025-07-15 02:51:23 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
[2025-07-15 02:51:23 +0000] [1] [INFO] Using worker: gevent
[2025-07-15 02:51:23 +0000] [43] [INFO] Booting worker with pid: 43
2025-07-15 02:51:27.169 INFO [MainThread] [utils.py:164] - NumExpr defaulting to 16 threads.
/app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '\.'
  re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U)
/app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s'
  re_skip_default = re.compile("(\r\n|\s)", re.U)
/app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '\.'
  re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)")
/app/api/.venv/lib/python3.12/site-packages/jieba/_compat.py:18: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources
/app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:3146: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:3146: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:2558: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(parent)
/app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:3146: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
  declare_namespace(pkg)
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '\.'
  re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '\.'
  re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s'
  re_skip_internal = re.compile("(\r\n|\s)")
/app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '\.'
  re_num = re.compile("[\.0-9]+")
/app/api/.venv/lib/python3.12/site-packages/jieba/analyse/tfidf.py:47: ResourceWarning: unclosed file <_io.BufferedReader name='/app/api/.venv/lib/python3.12/site-packages/jieba/analyse/idf.txt'>
  content = open(new_idf_path, 'rb').read().decode('utf-8')
ResourceWarning: Enable tracemalloc to get the object allocation traceback
Building prefix dict from the default dictionary ...
2025-07-15 02:58:08.581 DEBUG [Thread-8 (_retriever)] [__init__.py:113] - Building prefix dict from the default dictionary ...
Dumping model to file cache /tmp/jieba.cache
2025-07-15 02:58:09.466 DEBUG [Thread-8 (_retriever)] [__init__.py:146] - Dumping model to file cache /tmp/jieba.cache
Loading model cost 0.977 seconds.
Prefix dict has been built successfully.
2025-07-15 02:58:09.558 DEBUG [Thread-8 (_retriever)] [__init__.py:164] - Loading model cost 0.977 seconds.
2025-07-15 02:58:09.559 DEBUG [Thread-8 (_retriever)] [__init__.py:166] - Prefix dict has been built successfully.
2025-07-15 04:33:35.149 INFO [Dummy-100] [update_provider_when_message_created.py:133] - Provider updates completed successfully. Updates: 1, Duration: 0.003s, Tenant: 53b261b3-84fc-4f52-b707-1a224982b6ca, Provider: langgenius/openai_api_compatible/openai_api_compatible
2025-07-15 04:34:12.721 INFO [Dummy-107] [update_provider_when_message_created.py:133] - Provider updates completed successfully. Updates: 1, Duration: 0.002s, Tenant: 53b261b3-84fc-4f52-b707-1a224982b6ca, Provider: langgenius/openai_api_compatible/openai_api_compatible
/app/api/.venv/lib/python3.12/site-packages/pypdfium2/_helpers/textpage.py:80: UserWarning: get_text_range() call with default params will be implicitly redirected to get_text_bounded()
  warnings.warn("get_text_range() call with default params will be implicitly redirected to get_text_bounded()")
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
2025-07-15 05:57:37.443 INFO [Thread-183 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK"
2025-07-15 05:58:04.648 INFO [Thread-192 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK"
2025-07-15 05:58:12.704 INFO [Thread-186 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK"
2025-07-15 06:16:17.026 INFO [Thread-221 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK"
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
/app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.
  df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x)  # type: ignore
2025-07-15 06:33:09.583 INFO [Thread-244 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK"
2025-07-15 06:35:52.292 INFO [Thread-252 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK"
2025-07-15 06:36:02.436 ERROR [Dummy-262] [base.py:1009] - Exception during reset or similar
Traceback (most recent call last):
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 987, in _finalize_fairy
    fairy._reset(
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1433, in _reset
    pool._dialect.do_rollback(self)
  File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 703, in do_rollback
    dbapi_connection.rollback()
  File "/app/api/.venv/lib/python3.12/site-packages/psycogreen/gevent.py", line 36, in gevent_wait_callback
    wait_read(conn.fileno(), timeout=timeout)
  File "src/gevent/_hub_primitives.py", line 353, in gevent._gevent_c_hub_primitives.wait_read
  File "src/gevent/_hub_primitives.py", line 367, in gevent._gevent_c_hub_primitives.wait_read
  File "src/gevent/_hub_primitives.py", line 350, in gevent._gevent_c_hub_primitives.wait_on_watcher
  File "src/gevent/_hub_primitives.py", line 304, in gevent._gevent_c_hub_primitives._primitive_wait
  File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
  File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
  File "src/gevent/_hub_primitives.py", line 55, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait
  File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 64, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 67, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
  File "src/gevent/_greenlet_primitives.py", line 68, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out
gevent.exceptions.BlockingSwitchOutError: Impossible to call blocking function in the event loop callback
/app/api/.venv/lib/python3.12/site-packages/pypdfium2/_helpers/textpage.py:80: UserWarning: get_text_range() call with default params will be implicitly redirected to get_text_bounded()
  warnings.warn("get_text_range() call with default params will be implicitly redirected to get_text_bounded()")

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @liuxin638507 on GitHub (Jul 15, 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 1.6.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ``` docker logs docker_api_1 Running migrations 2025-07-15 02:51:13.720 INFO [MainThread] [utils.py:164] - NumExpr defaulting to 16 threads. Preparing database migration... Starting database migration. INFO [alembic.runtime.migration] Context impl PostgresqlImpl. INFO [alembic.runtime.migration] Will assume transactional DDL. Database migration successful! [2025-07-15 02:51:23 +0000] [1] [INFO] Starting gunicorn 23.0.0 [2025-07-15 02:51:23 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1) [2025-07-15 02:51:23 +0000] [1] [INFO] Using worker: gevent [2025-07-15 02:51:23 +0000] [43] [INFO] Booting worker with pid: 43 2025-07-15 02:51:27.169 INFO [MainThread] [utils.py:164] - NumExpr defaulting to 16 threads. /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:44: SyntaxWarning: invalid escape sequence '\.' re_han_default = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U) /app/api/.venv/lib/python3.12/site-packages/jieba/__init__.py:46: SyntaxWarning: invalid escape sequence '\s' re_skip_default = re.compile("(\r\n|\s)", re.U) /app/api/.venv/lib/python3.12/site-packages/jieba/finalseg/__init__.py:78: SyntaxWarning: invalid escape sequence '\.' re_skip = re.compile("([a-zA-Z0-9]+(?:\.\d+)?%?)") /app/api/.venv/lib/python3.12/site-packages/jieba/_compat.py:18: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81. import pkg_resources /app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:3146: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:3146: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google.cloud')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:2558: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(parent) /app/api/.venv/lib/python3.12/site-packages/pkg_resources/__init__.py:3146: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:16: SyntaxWarning: invalid escape sequence '\.' re_skip_detail = re.compile("([\.0-9]+|[a-zA-Z0-9]+)") /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:17: SyntaxWarning: invalid escape sequence '\.' re_han_internal = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._]+)") /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:18: SyntaxWarning: invalid escape sequence '\s' re_skip_internal = re.compile("(\r\n|\s)") /app/api/.venv/lib/python3.12/site-packages/jieba/posseg/__init__.py:21: SyntaxWarning: invalid escape sequence '\.' re_num = re.compile("[\.0-9]+") /app/api/.venv/lib/python3.12/site-packages/jieba/analyse/tfidf.py:47: ResourceWarning: unclosed file <_io.BufferedReader name='/app/api/.venv/lib/python3.12/site-packages/jieba/analyse/idf.txt'> content = open(new_idf_path, 'rb').read().decode('utf-8') ResourceWarning: Enable tracemalloc to get the object allocation traceback Building prefix dict from the default dictionary ... 2025-07-15 02:58:08.581 DEBUG [Thread-8 (_retriever)] [__init__.py:113] - Building prefix dict from the default dictionary ... Dumping model to file cache /tmp/jieba.cache 2025-07-15 02:58:09.466 DEBUG [Thread-8 (_retriever)] [__init__.py:146] - Dumping model to file cache /tmp/jieba.cache Loading model cost 0.977 seconds. Prefix dict has been built successfully. 2025-07-15 02:58:09.558 DEBUG [Thread-8 (_retriever)] [__init__.py:164] - Loading model cost 0.977 seconds. 2025-07-15 02:58:09.559 DEBUG [Thread-8 (_retriever)] [__init__.py:166] - Prefix dict has been built successfully. 2025-07-15 04:33:35.149 INFO [Dummy-100] [update_provider_when_message_created.py:133] - Provider updates completed successfully. Updates: 1, Duration: 0.003s, Tenant: 53b261b3-84fc-4f52-b707-1a224982b6ca, Provider: langgenius/openai_api_compatible/openai_api_compatible 2025-07-15 04:34:12.721 INFO [Dummy-107] [update_provider_when_message_created.py:133] - Provider updates completed successfully. Updates: 1, Duration: 0.002s, Tenant: 53b261b3-84fc-4f52-b707-1a224982b6ca, Provider: langgenius/openai_api_compatible/openai_api_compatible /app/api/.venv/lib/python3.12/site-packages/pypdfium2/_helpers/textpage.py:80: UserWarning: get_text_range() call with default params will be implicitly redirected to get_text_bounded() warnings.warn("get_text_range() call with default params will be implicitly redirected to get_text_bounded()") /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore 2025-07-15 05:57:37.443 INFO [Thread-183 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" 2025-07-15 05:58:04.648 INFO [Thread-192 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" 2025-07-15 05:58:12.704 INFO [Thread-186 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" 2025-07-15 06:16:17.026 INFO [Thread-221 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore /app/api/core/workflow/nodes/document_extractor/node.py:451: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead. df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore 2025-07-15 06:33:09.583 INFO [Thread-244 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" 2025-07-15 06:35:52.292 INFO [Thread-252 (_generate_worker)] [_client.py:1038] - HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" 2025-07-15 06:36:02.436 ERROR [Dummy-262] [base.py:1009] - Exception during reset or similar Traceback (most recent call last): File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 987, in _finalize_fairy fairy._reset( File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/pool/base.py", line 1433, in _reset pool._dialect.do_rollback(self) File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/engine/default.py", line 703, in do_rollback dbapi_connection.rollback() File "/app/api/.venv/lib/python3.12/site-packages/psycogreen/gevent.py", line 36, in gevent_wait_callback wait_read(conn.fileno(), timeout=timeout) File "src/gevent/_hub_primitives.py", line 353, in gevent._gevent_c_hub_primitives.wait_read File "src/gevent/_hub_primitives.py", line 367, in gevent._gevent_c_hub_primitives.wait_read File "src/gevent/_hub_primitives.py", line 350, in gevent._gevent_c_hub_primitives.wait_on_watcher File "src/gevent/_hub_primitives.py", line 304, in gevent._gevent_c_hub_primitives._primitive_wait File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait File "src/gevent/_hub_primitives.py", line 46, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait File "src/gevent/_hub_primitives.py", line 55, in gevent._gevent_c_hub_primitives.WaitOperationsGreenlet.wait File "src/gevent/_waiter.py", line 154, in gevent._gevent_c_waiter.Waiter.get File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_greenlet_primitives.py", line 61, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_greenlet_primitives.py", line 64, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch File "src/gevent/_greenlet_primitives.py", line 67, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out File "src/gevent/_greenlet_primitives.py", line 68, in gevent._gevent_c_greenlet_primitives.SwitchOutGreenletWithLoop.switch_out gevent.exceptions.BlockingSwitchOutError: Impossible to call blocking function in the event loop callback /app/api/.venv/lib/python3.12/site-packages/pypdfium2/_helpers/textpage.py:80: UserWarning: get_text_range() call with default params will be implicitly redirected to get_text_bounded() warnings.warn("get_text_range() call with default params will be implicitly redirected to get_text_bounded()") ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the stale label 2026-02-21 19:21:30 -05:00
yindo closed this issue 2026-02-21 19:21:31 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Aug 26, 2025):

Hi, @liuxin638507. I'm Dosu, and I'm helping the Dify team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a gevent.exceptions.BlockingSwitchOutError during startup of Dify v1.6.0 in a self-hosted Docker environment using gunicorn with gevent workers.
  • Logs also indicated a SyntaxWarning from the jieba package.
  • No further comments or updates have been provided since the initial report.
  • The concurrency error and warning remain unresolved and require additional investigation.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of Dify by commenting here.
  • If I do not hear back within 15 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 26, 2025): Hi, @liuxin638507. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a `gevent.exceptions.BlockingSwitchOutError` during startup of Dify v1.6.0 in a self-hosted Docker environment using gunicorn with gevent workers. - Logs also indicated a `SyntaxWarning` from the jieba package. - No further comments or updates have been provided since the initial report. - The concurrency error and warning remain unresolved and require additional investigation. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of Dify by commenting here. - If I do not hear back within 15 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#15390