TaskWeaver
TaskWeaver copied to clipboard
The Chainlit web service freezes after the code_interpreter crashes, and port 8000 is unable to serve requests externally.
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:
- Start the service
chainlit run app.py - Type the user query "xxx"
从 sql_pull_data 中获取 ds>='20250101' and ds<='20250105' 按 ds 汇总的 count、max/min emq_timestamp 值 - Wait for the response
- The web UI shows no exceptions and stays stuck at the 'executing code...' stage.
- 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
- 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
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.
Could you try running it using the console mode instead of the chainlit mode? I'm trying to rule out simple issues.
+1 easy to crash blocks production deployment
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 ?
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.