Skip to content

The Chainlit web service freezes after the code_interpreter crashes, and port 8000 is unable to serve requests externally. #456

@kuantian-zhang

Description

@kuantian-zhang

Describe the bug
I start TaskWeaver with chainlit run app.py, and the configuration for code execution is execution_service.kernel_mode=local. Sometimes, when a task reaches code_interpreter and the session stops, the Chainlit web service freezes and can no longer provide any service. Has anyone encountered the same issue?

To Reproduce
Steps to reproduce the behavior:

  1. Start the service
    chainlit run app.py
  2. Type the user query "xxx"
    从 sql_pull_data 中获取 ds>='20250101' and ds<='20250105' 按 ds 汇总的 count、max/min emq_timestamp 值
  3. Wait for the response
  4. The web UI shows no exceptions and stays stuck at the 'executing code...' stage.
  5. the chainlit server's log as below
2025-01-14 17:45:22 - Session 20250114-094522-7032e723 is initialized
2025-01-14 17:45:22 - CodeGenerator initialized successfully
2025-01-14 17:45:22 - CodeInterpreter initialized successfully.
2025-01-14 17:45:22 - Planner initialized successfully
Starting new session
Stopping session 20250114-094522-7032e723
2025-01-14 17:45:24 - Session 20250114-094522-7032e723 is stopped
2025-01-14 17:45:24 - CodeInterpreter closed successfully
2025-01-14 17:45:24 - CodeInterpreter closed successfully
  1. refresh the UI web, chainlit server stucked, Checking the TaskWeaver-related processes, I found that the Chainlit process is running normally, and the code_interpreter does not stop even after the session is terminated

Image

Image

Image

Expected behavior
A clear and concise description of what you expected to happen. NA if feel not applicable.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment Information (please complete the following information):

  • OS: Linux
  • Python Version: 3.10
  • LLM that you're using: GPT-3
  • Other Configurations except the LLM api/key related: no

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions