webwhiz-ai / webwhiz

WebWhiz allows you to create an AI chatbot that knows everything about your product and can instantly respond to your customer's queries.
https://www.webwhiz.ai/
GNU Affero General Public License v3.0
929 stars 158 forks source link

Lost background tasks. Creation of chatbot fails when multiple chatbots are created at the same time. #230

Open zypriafl opened 3 months ago

zypriafl commented 3 months ago

I have started by creating 4 chatbots simultaneously using different configurations.

BUG: Unexpected Failed Chatbot Creation without logs: All chatbots were created successfully except for one that is still loading till today. By debugging the logs it seems that the task for the creation of this chatbot has been received:

2024-08-06T12:16:54.455258684Z celery.node Received task: tasks.crawl[6a3f80c0-075b-462e-a525-dd299409c908], args: [object Object],66b21436a6f4fb590eb28d32,1,false, kwargs: {}

But it has never finished. The corresponding task to the chatbot that is still hanging only had a task received but NO task finished.  Also by looking on the list of processes, there is not corresponding PID to the crawler worker that is using significant amount CPU.

No information was logged to the user and the task was lost without any available logs or information.

Do you habe any ideas what can cause this behaviour?

hrithikt commented 2 months ago

@zypriafl Could you please provide some more details? If you have access to the database, can you check and share the status of the knowledge base?

In the meantime, I will attempt to reproduce the issue.

ArnoldSelly commented 2 months ago

I have the same problem. When I started creating 3 chatbots in parallel. 1 is lost and there is nothing you can do about it except deleting the chatbot.