Custom Tracker Store in Kubernetes Deployment

Hi there, I would like to know how do I enable a custom tracker store in my Rasa X Kuberenetes Deployment.

My end goal is to set a maximum number of saved stories to prevent the growth of Tracker Store, which eventually leads to delays and failures in API communication.

How it is written here I need a custom tracker store for that.

And how I can see here, I need to edit the endpoint.yml to enable custom tracker store

I suppose I have to edit something in my values.yml file, as I used the Helm Chart Installation guide to deploy Rasa X on Kubernetes Cluster. But I couldn’t find any infos about that.

I currently use the default deployment with helm charts on Google Kubernetes Engine.

1 Like

I suppose I have to edit something in my values.yml file, as I used the Helm Chart Installation guide to deploy Rasa X on Kubernetes Cluster. But I couldn’t find any infos about that.

But you’d still be using a Postgres DB? In that case you need a custom Rasa Open Source image which includes your custom tracker store module.

In addition you’d need to override the endpoints part in the configmap here.

which eventually leads to delays and failures in API communication.

Delays by which service? The database or Rasa Open Source? In that case you might wanna look at configuring conversation sessions.

1 Like

Hello Tobias,

Yes, seems like I use PostrgeSQL. I’ll look through these files, thank you!

In fact the pods that keep restarting are from rasa-production service, so this happens to be Rasa Open Source. But as I start the stress tests in different settings I always get the same picture: after some time of functioning, API starts responding with Server Error 502: Bad Gateway and in the same moment the pods keep restarting. So my assumption is that the conversation history gets too big, and now I want to create a custom Tracker Store where I could just log the data exchanged between these services (db and production), and may be then set the limit of events sent back by the tracker.

It may be that my assumption is completely wrong and the cause of such a low RPS rate through the REST Channel is not Tracking. I’ll send a couple of test reports, so you can get familiar with the problematic. I use the Locust.io tool for REST API’s Stress testing. Check this Git Repo.

report_1622453254.377043 (session length 5 min, no slots takeaway).html (731.9 KB)

report_1622135825.5336115 (On GKE - 30 PRS with 1000 Users.html (720.9 KB)

Nevertheless, my next question would be, how do I create a custom image with custom Tracker Store? Should I then use this image to replace the current rasa-x-production service? If so, how do I do that?

1 Like

One more question: What do the logs of the crashed pods say?

downloaded-logs-20210601-184339.json (67.1 KB)

Logs from rasa production pod.

Hello @Tobias_Wochinger and Yan,

I would like to use a MySQL database as tracker store. So in rasa-config-files-configmap.yaml I should do:

rasa-endpoints: |
    tracker_store:
      type: sql
      dialect: "mysql"
      url: "localhost"
      port: "3000"
      username: "rasa"
      password: "rasa"
      db: "rasa_tracker"
      {{- if .Values.rasa.useLoginDatabase }}
      login_db: {{ template "rasa-x.psql.database" . }}
      {{- end }}

But I’m confused about the last three lines.

And also, how do I get the file, and how do I update the Helm repo after modifying it? I used the quick installation.

@desmarchris hi how are you? we appreciate if you can help us regarding the above question of Chris Rahme.

@stephens hi how are you? we appreciate if you can help us regarding the above question of Chris Rahme.

The questions from @ChrisRahme are Helm and kubernetes related. There are many good tutorials on these topics. I used this Create Your First Helm Chart tutorial but there are many others and you also should read up on templates.

When customizing the helm chart, here’s the cheatsheet I use:

git clone https://github.com/RasaHQ/rasa-x-helm.git
# make changes to chart
cd rasa-x-helm/charts/rasa-x
helm repo index .
helm dependency update
cd ~/Dev/kubernetes/helm-charts
helm template -f test_values.yml rasa rasa-x-helm/charts/rasa-x > test.yml
# apply the test.yml to test environment
1 Like

i could solve all problems.

1 Like

hello, we are using rasa opens source helm chart at “helm-charts/charts/rasa at main · RasaHQ/helm-charts · GitHub” But looks like the Helm chart by default support Postgresql as configurable tracker store and not MongoDB. Is there any we can configure our custom tracker store to store chats into mongo DB when we deploy RASA HELM Chart please.

For example below is our current config in endpoints.yaml but not getting clarity on how can we make it work in the context of RASA-HELM or how to configure this in values.custom.yaml pls

tracker_store: type: myTracker.MongoTrackerStore url: mongodb+srv://my db URl db: admin username: admin password: my password

Appreciate any help on this please and thanks in advance