-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workflow trace error #12117
Comments
I found a similar open issue related to a workflow trace error in Dify. The error message "Instance '<Workflow at 0x7f7800591750>' is not persistent within this Session" suggests that the
By ensuring that the To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
fixed in #12071 |
Still seeing this issue on main:
|
Hi, could you please provide more detailed information, such as the trace log? We want to know where this error happened. |
Hi @laipz8200 👋 , Still seeing on 0.15.0. This is from the log of the api container:
TY! -M |
Hi, @mgmorcos. The logs you prividered seems not belongs to the v0.15.0 version, please check you docker image. |
Self Checks
Dify version
0.14.2
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
✔️ Expected Behavior
trace successfully sended to langfuse
❌ Actual Behavior
2024-12-26 [2024-12-26 11:54:50,469][ERROR][trace_manager_timer_2024-12-26 03:54:45][ops_trace_manager.py:739] Error processing trace tasks
2024-12-26 Traceback (most recent call last):
2024-12-26 File "/app/api/core/ops/ops_trace_manager.py", line 737, in run
2024-12-26 self.send_to_celery(tasks)
2024-12-26 File "/app/api/core/ops/ops_trace_manager.py", line 753, in send_to_celery
2024-12-26 trace_info = task.execute()
2024-12-26 ^^^^^^^^^^^^^^
2024-12-26 File "/app/api/core/ops/ops_trace_manager.py", line 330, in execute
2024-12-26 return self.preprocess()
2024-12-26 ^^^^^^^^^^^^^^^^^
2024-12-26 File "/app/api/core/ops/ops_trace_manager.py", line 352, in preprocess
2024-12-26 return preprocess_map.get(self.trace_type, lambda: None)()
2024-12-26 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-12-26 File "/app/api/core/ops/ops_trace_manager.py", line 335, in
2024-12-26 TraceTaskName.WORKFLOW_TRACE: lambda: self.workflow_trace(
2024-12-26 ^^^^^^^^^^^^^^^^^^^^
2024-12-26 File "/app/api/core/ops/ops_trace_manager.py", line 363, in workflow_trace
2024-12-26 db.session.refresh(workflow_run)
2024-12-26 File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/scoping.py", line 1767, in refresh
2024-12-26 return self._proxied.refresh(
2024-12-26 ^^^^^^^^^^^^^^^^^^^^^^
2024-12-26 File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3143, in refresh
2024-12-26 self._expire_state(state, attribute_names)
2024-12-26 File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 3269, in _expire_state
2024-12-26 self._validate_persistent(state)
2024-12-26 File "/app/api/.venv/lib/python3.12/site-packages/sqlalchemy/orm/session.py", line 4138, in _validate_persistent
2024-12-26 raise sa_exc.InvalidRequestError(
2024-12-26 sqlalchemy.exc.InvalidRequestError:Instance '<WorkflowRun at 0x7fb237659bb0>' is not persistent within this Session
2024-12-26 [2024-12-26 11:55:08,350][DEBUG][Dummy-40][_trace.py:47] close.started
2024-12-26 [2024-12-26 11:55:08,350][DEBUG][Dummy-40][_trace.py:47] close.complete
2024-12-26 [2024-12-26 11:56:45,503][DEBUG][Dummy-91][_trace.py:47] close.started
2024-12-26 [2024-12-26 11:56:45,503][DEBUG][Dummy-91][_trace.py:47] close.complete
The text was updated successfully, but these errors were encountered: