Rasa becomes very slow for long conversations

I performed a test using the Jmeter to check the response time of the rasa. For small conversation history of 10 messages, response time was as low as 200ms but it increases to 3s for the history of 500 messages. When the size of history reaches about 1000 messages, the response time is about 5 seconds. For conversation history of 4500 messages, the response time is about 20 seconds. In addition to slowing down the response time, there is a serious problem with loading the Rasa-x panel when the tracker size increases.

I saw that this problem has been raised in the forum before, but I did not see the final solution for it. I do not know if implementing and using a custom tracker store can be helpful or not. What is the final solution?

1 Like

Hi @z.fallahn. What versions of Rasa Open Source and Rasa X are you using?

Hi @tyd. Iā€™m using these version:

rasa-x=0.38.1
rasa=2.4.3
rasa-sdk=2.4.1

What is your use case? Why does a user send 4,500 messages?

Have you looked into using conversation sessions?

I did a test with the Jmeter tool. I wanted to see if the response time is constant or slows down over time, so I sent a large number of messages of about 5,000 with a 90-second interval with Jmeter and monitored the response time.

For my bot, 4500 is really a lot, and that number of messages was just for testing. It is very likely that a user will send a total of 500 messages after a couple of months. The fact that after 500 messages, the time to receive the response is about 3 seconds is considered slow for the user, so I wanted to know what is the solution? It seems that when responding to the user, his/her tracker is loaded, and the longer the tracker events become, the slower it may be, right?

I had seen the session from older versions but had not used it much. What is the effect of using a session to solve this problem? Whenever the tracker loads, it only loads the events after the start of the session, and this prevents slowing down? What about the Rasa X panel? As far as I understand, the panel takes all the events for each user from the moment of starting the conversation (0) and shows it right? What is the effect of session settings on the panel?

1 Like