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

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

Open
zhangkuantian opened this issue Jan 14, 2025 · 4 comments

Comments

@zhangkuantian
Copy link

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.

@liqul
Copy link
Contributor

liqul commented Jan 14, 2025

Could you try running it using the console mode instead of the chainlit mode? I'm trying to rule out simple issues.

@codewider
Copy link

+1
easy to crash blocks production deployment

@zhangkuantian
Copy link
Author

When running in console mode, it works fine, but when using the chainlit web ui, an issue occurs. Could it be that after the chainlit session is closed, the Jupyter kernel process executing the code does not shut down, causing a deadlock ?

@liqul
Copy link
Contributor

liqul commented Jan 17, 2025

I'm not sure the reason. Actually, Chainlit is only presented as something in the playground for testing purposes. We don't have bandwidth to develop and maintain our own UI. It is not recommended for serious usages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants