dify icon indicating copy to clipboard operation
dify copied to clipboard

Stopped by user.

Open 18600709862 opened this issue 1 year ago • 5 comments

Self Checks

  • [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [X] I have searched for existing issues search for existing issues, including closed ones.
  • [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [X] Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I created a long text generation workflow application and then ran it, and the application stopped automatically. log display: Stopped by user.

timeout set: docker-compose.xml GUNICORN_TIMEOUT: ${GUNICORN_TIMEOUT:-3600} API_TOOL_DEFAULT_CONNECT_TIMEOUT: ${API_TOOL_DEFAULT_CONNECT_TIMEOUT:-6000} API_TOOL_DEFAULT_READ_TIMEOUT: ${API_TOOL_DEFAULT_READ_TIMEOUT:-3600} environment HTTP_REQUEST_MAX_CONNECT_TIMEOUT: 6000

✔️ Expected Behavior

run complete

❌ Actual Behavior

Start 43.843 ms Generate Subtitles and Outlines 1.517K tokens · 31.743 s Extract Subtitles and Outlines 139.945 ms Iteration 19 m 28.879 s

3个迭代 Stopped by user. LLM 3 41.141 s Stopped by user. 2024-09-29 08-02-06屏幕截图

18600709862 avatar Sep 29 '24 00:09 18600709862

@18600709862 你好!我是Dosu,我是一个可以帮助您解决错误,回答问题并成为贡献者的机器人。我会在等待人类维护者的过程中帮助您。

I found a similar issue that might be relevant to your problem. The issue titled "The workflow has ended, but there is no output on the front end of the page, and the workflow keeps spinning" was closed and referenced by another issue titled "Detailed logs break down with graph_engine and iteration node" [1].

The log message "Stopped by user" indicates that the application is being stopped manually or by some external trigger. This message is not related to timeout settings in your docker-compose.yaml or environment variables. Given the provided docker-compose.yaml, the restart: always policy is set for all services, which means the services should automatically restart unless explicitly stopped.

Here are a few potential reasons for this issue:

  1. Manual Intervention: Someone might be manually stopping the containers using commands like docker stop.
  2. External Scripts or Tools: There might be external scripts or tools that are stopping the containers.
  3. Resource Constraints: If the host machine is running out of resources (CPU, memory), Docker might stop the containers.

To further diagnose the issue, you can:

  • Check the Docker logs for more details using docker logs <container_id>.
  • Ensure no external scripts or tools are stopping the containers.
  • Monitor the resource usage on the host machine.

If none of these apply, you might need to look into Docker's event logs to see what is triggering the stop event [2].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar Sep 29 '24 00:09 dosubot[bot]

I had the same problem

massif-01 avatar Oct 08 '24 09:10 massif-01

Can you guys provide a minimal DSL to reproduce this issue?

crazywoola avatar Oct 10 '24 03:10 crazywoola

屏幕截图 2024-10-10 172939 屏幕截图 2024-10-10 173033 There seems to be a 20 minute\1200s run limit, what should I do with it?

yuncengshangdepingyuan avatar Oct 10 '24 09:10 yuncengshangdepingyuan

屏幕截图 2024-10-10 172939 屏幕截图 2024-10-10 173033 There seems to be a 20 minute\1200s run limit, what should I do with it?

I've solved this problem by add "APP_MAX_EXECUTION_TIME: ${APP_MAX_EXECUTION_TIME:-12000}" in docker-compose.yaml

https://github.com/massif-01/dify/blob/main/docker/docker-compose.yaml

massif-01 avatar Oct 10 '24 12:10 massif-01

屏幕截图 2024-10-11 100125 thank you,and may be I can change this one ?

yuncengshangdepingyuan avatar Oct 11 '24 02:10 yuncengshangdepingyuan

屏幕截图 2024-10-11 100125 thank you,and may be I can change this one ?

i have also changed this

massif-01 avatar Oct 11 '24 06:10 massif-01

It's useless.I found that it has been written here: 1 Modify or add to these parameters. 1 It's ok now for me.

yuncengshangdepingyuan avatar Oct 22 '24 16:10 yuncengshangdepingyuan

After changing .env config, 'Stopped by user' still exists and stops my workflow. image image

detongz avatar Dec 11 '24 23:12 detongz

Ensure that there is no work_flow_max_Execution_time=1200 elsewhere; Ensure that the container is restarted. If it doesn't work, there's nothing I can do.

yuncengshangdepingyuan avatar Dec 12 '24 02:12 yuncengshangdepingyuan

Found solution: you should recreate you container after change .env file. Like this:

cd /path/to/dify/docker
vi .env
{change the (APP|WORKFLOW)_MAX_EXECUTION_TIME to as bigger enough you wished.}

And then, run command blow:

docker compose up -d --force-recreate api worker worker_beat nginx

OR you have specific project name:

docker compose [-p dify] up -d --force-recreate api worker worker_beat nginx

Wait for seconds, run you workflow or chat apps.

RandalTeng avatar Sep 05 '25 09:09 RandalTeng