dify - 💡(How to fix) Fix Failed to execute code, which is likely a network issue, please check if the sandbox service is running. ( Error: timed out )

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

This is my workflow. It can run normally when testing a small amount of data. However, when I uploaded an excel file with approximately 16M of data and 11,344 rows, it failed to run the next time: "Failed to execute code. This is likely a network issue. Please check if the sandbox service is running." (Error: timed out) Failed to execute code, which is likely a network issue, please check if the sandbox service is running. ( Error: timed out )

RAW_BUFFERClick to expand / collapse

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.13.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

<img width="1725" height="595" alt="Image" src="https://github.com/user-attachments/assets/0ce60511-44d1-479f-84ca-5a87e2f1cd43" /> This is my workflow. It can run normally when testing a small amount of data. However, when I uploaded an excel file with approximately 16M of data and 11,344 rows, it failed to run the next time: "Failed to execute code. This is likely a network issue. Please check if the sandbox service is running." (Error: timed out) I would like to ask if my process can be implemented using Dify: There is a data template with 11,334 rows of data -> Dify workflow links to the database to view the fields of the database table, approximately 15,000 records. Then, through the code node, Python code is used to process these two sets of data -> The processed data is generated as a CSV file.

✔️ Expected Behavior

The Python code executed successfully and output the data.

❌ Actual Behavior

Failed to execute code, which is likely a network issue, please check if the sandbox service is running. ( Error: timed out )

extent analysis

TL;DR

Increase the timeout or optimize the Python code to handle large datasets to resolve the "Failed to execute code" error due to a timeout.

Guidance

  • Verify that the sandbox service is running and properly configured, as the error message suggests a potential network issue.
  • Check the Python code for any performance bottlenecks or inefficient operations that could be causing the timeout when processing large datasets.
  • Consider increasing the timeout value for the code execution, if possible, to allow for longer processing times.
  • Optimize the workflow to handle large datasets, such as by processing the data in chunks or using more efficient data processing algorithms.

Example

No code snippet is provided as the issue does not include the specific Python code being executed.

Notes

The issue may be related to the large size of the dataset being processed, and increasing the timeout or optimizing the code may not be sufficient to resolve the issue. Further investigation into the code and workflow may be necessary.

Recommendation

Apply a workaround by optimizing the Python code to handle large datasets, as increasing the timeout may not be a scalable solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING