Tracker Store slows down the bot processing

Hello Team,
I have used both Rasa NLU and Rasa Core
I have used SQL database as tracker store.
2021-03-15 17:13:42 DEBUG rasa.core.tracker_store - Connection to SQL database ‘rasa_server.db’ successful.
The bot is in beta testing with 250 users in my firm for the last 8 months.

My db file size is approx 600 mb. And now whats happening is - My Rasa models server is taking little more time to process the message.

with the db file of 600 mb , i was receiving time lag of 2 .44 sec

When i deleted the db and checked the same conversations the time decreased by 2.5 sec.

I just want to know why this happened?
Please help me to understand this scenario.

you are most likely using sqllite if I am not mistaken looking at your logs.

600mb file on sqllite is fairly large i think as sqllite is limited and does not handle concurrency meaning your SQL plans are not processed as efficiently as it would on MySql or MSSQL

Consider moving to either Redis as your tracker store because Redis is known for O(1) retrievals

Thanks souvikg10,
I will try Redis and will ping once i am done.

I also want to know one thing
I am thinking of making multiple instances of Rasa server. I went through he doc . it says for this Redis should be used as lock store. Can u help me how to do that.

When you run multiple instances of Rasa server, you have a possibility that each request that needs to be processed for a single conversation ID surpasses the other ad thus creating an issue in the sequence of your conversation. A lock store is effectively designed to avoid that. The difference between a tracker store and lock store is that a tracker store keeps log of the entire conversation while a lock store ensures that a conversation instance is locked so that no other process jumps on the conversation, a case which is common in multiple processes running on a server

Thanks for replying so soon.
I have SQL as tracker store and I am using InMemoryLockStore as lock store.
Now I am thinking of making multiple instances of Rasa server so that i can handle more requests with a lesser response time.

I am asking you to guide me how shall i achieve this.
I read this from the doc - " RedisLockStore maintains conversation locks using Redis as a persistence layer. This is the recommended lock store for running a replicated set of Rasa servers."

I intent to do the same .
currently i have 1 Rasa models server and 1 Rasa actions server.
To have more instances tell me how can i do this

RedisLockStore is the way to go.

Regarding SQLTrackerStore - Are you using sqllite? you need to use a remote SQL database to handle scaling up of your rasa server. Rasa uses ORM so make sure your SQL database enables create schema permissions for the application. PostgresDB is a very good option in this case(in every case, in my opinion)

type: SQL
dialect: "sqlite"  # the dialect used to interact with the db
url: ""  # (optional) host of the sql db, e.g. "localhost"
db: "rasa_server.db"  # path to your db
username: ""  # username used for authentication
password: ""  # password used for authentication

I am using this in my endpoints.yml file

You cannot scale using SQLite as your tracker store. You need something production like. Postgres, MySQL or MSSQL as RDB or NoSql like MongoDb could be your option. Another option is to use redis as your tracker store as well