When number of users increase rasa server becomes slow

I have deployed my Rasa bot on AWS. With increase in number of users responses from rasa server takes 5~10 secs sometimes more. The server goes in unhealthy state and starts again.

After the server gets restarted response time decreases to ~<1s and then it gradually increases until it reaches unhealthy state.

My server gets restarted nearly 6-7 times a day. What can be the possible reason??

How can i end a user session when the user exits the chat?


Hi @ojas , could you share some more details on your setup? Things like what channel are you using, what version of Rasa Open Source, how many users are connected simultaneously.

I am using : Rasa Version : 2.2.0 Rasa SDK Version : 2.2.0

Chatbot is deployed on AWS server. No. of users are around ~300 per hour

Is the bot deployed with kubernetes or how is it deployed? 300 users per hour should be fine, but would be good to get more details on your deployment setup (e.g. are you using a persistent tracker store, a lock store etc).

Apologies for delay @akelad!

I am using docker image to deploy rasa bot and InMemoryTrackerStore for event storage.

Since I don’t want to save my conversation history i preferred using InMemoryTrackerStore (I am not sure whether this is the reason why response time increases after many conversations from the bot)

I have few questions regarding this only:

  1. Can InMemoryTrackerStore results in delay in response after many conversations with the bot?

  2. When user chat ends I pass ‘/restart’ event to clear the slots. But event tracker keeps track of all events. Is there any way to clear the events once user has done chatting with the bot ?

  3. What is the best approach to maintain a constant response time of the bot?

Thanks in advance!!

@SamS can you please look into the issue?

Hey @ojas, I’ll let Akela answer (partly because I’m not an expert on these things) :slightly_smiling_face:

For the future, please, only tag one person – tagging two won’t help, it only generates more clutter…

Sure @SamS . Will take care of this.

Hi @akelad

Can you please suggest what is the optimal solution to tackle the event storage. Is there any way to clear events of particular “sender” by sending some payload or calling some function in request like: {message: “/some_payload_to_clear _sender_session”, sender: “Sender_unique_id”}.

Thanks in advance!

Hi, sorry for the delay, I missed your follow up replies. I would suggest using a persistent tracker store (SQL tracker store), as well as a lock store (redis lock store) to solve this issue.

Thanks for the reply @akelad ,

I have tried using MongoTrackerStore to store the events. But the problem i am facing is that there is a lot of event data that is being stored in “conversations” document which is hard to parse for conversation insights.

Secondly even if i configured my MongoTrackerStore, events are store InMemory and responses are getting delayed after some time.