Skip to content
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 code block randomly timeout #14225

Open
5 tasks done
ceerRep opened this issue Feb 24, 2025 · 5 comments
Open
5 tasks done

Workflow code block randomly timeout #14225

ceerRep opened this issue Feb 24, 2025 · 5 comments
Labels
🤔 cant-reproduce We can not reproduce it or the information is limited

Comments

@ceerRep
Copy link

ceerRep commented Feb 24, 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

0.15.3, sandbox 0.2.10

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Place a code block in a workflow
  2. Fill the code block input by query.string. Keep the default code snippet.
def main(arg1: str, arg2: str) -> dict:
  return {
      "result": arg1 + arg2,
  }
  1. Click run this step button
  2. Fill arg1 and arg2 with some text
  3. Click run button
  4. Repeat step 5 when step finishes

✔️ Expected Behavior

Successfully executed for each run with no error.
This simple snippet should not cost much time.

❌ Actual Behavior

Randomly timeout.

Image

@ceerRep ceerRep changed the title Sandbox randomly timeout Workflow code block randomly timeout Feb 24, 2025
Copy link

dosubot bot commented Feb 24, 2025

@ceerRep Hey there! 👋 I'm here to help you with bugs, questions, and becoming a contributor. Let's squash those bugs together!

A similar issue was discussed and resolved by adjusting the WORKER_TIMEOUT setting in the sandbox configuration. The default WORKER_TIMEOUT is set to 15 seconds, which might be too short for some operations [1]. You can try increasing this timeout value in your configuration to allow more time for the code execution to complete. Additionally, ensure that your system has sufficient resources and consider optimizing the code if necessary.

To continue talking to Dosu, mention @dosu.


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

@dosubot dosubot bot added 🌊 feat:workflow Workflow related stuff. 🐞 bug Something isn't working labels Feb 24, 2025
@crazywoola crazywoola removed 🐞 bug Something isn't working 🌊 feat:workflow Workflow related stuff. labels Feb 24, 2025
@crazywoola
Copy link
Member

Image

Can't reproduce this error. Might need more details.

@crazywoola crazywoola added the 🤔 cant-reproduce We can not reproduce it or the information is limited label Feb 24, 2025
@ceerRep
Copy link
Author

ceerRep commented Feb 24, 2025

Image Image

Sandbox log shows that it runs a job for 15s.

Image

Docker version

Docker version 26.1.3, build 26.1.3-0ubuntu1~24.04.1

How can I get more information?

@crazywoola
Copy link
Member

I suggest you changing the branch to 0.15.3 instead of the main branch.

@ceerRep
Copy link
Author

ceerRep commented Feb 24, 2025

The problem remains.

Image

I recloned the repo, checkouted 0.15.3, ensure that all data is deleted and reinstall dify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 cant-reproduce We can not reproduce it or the information is limited
Projects
None yet
Development

No branches or pull requests

2 participants