# Size of trackers in custom tracker store

**URL:** <https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998>\
**Category:** Rasa Open Source\
**Created:** [February 7, 2019, 5:35pm UTC](https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998 "2019-02-07T17:35:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsandbrook](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jsandbrook](https://forum.rasa.com/u/jsandbrook)\
**Post date:** [February 7, 2019, 5:35pm UTC](https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998/1 "2019-02-07T17:35:36Z")

</div>

Hello!

I’ve created a custom tracker store object to connect my bot to a centralized key/value store. That store has limits on the size of values and is also remote to my bot.

When do trackers get reset or pop old information off of the conversation? Is that configurable? I’d like to ensure trackers don’t exceed my store’s limits.

Also, are trackers retrieved/saved for every new user message/bot response? Since it’s remote, larger trackers could eventually impact my bot’s performance.

Thanks!

---

<div class="post-metadata">

**Author:** ![Ghostvv](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ghostvv/32/211_2.png) [@Ghostvv](https://forum.rasa.com/u/Ghostvv)\
**Post date:** [February 19, 2019, 9:13am UTC](https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998/2 "2019-02-19T09:13:00Z")

</div>

trackers have `max_event_history` property: [rasa\_core/trackers.py at 7451990c9d3948709e4dc59f05f18d8be77e1a45 · RasaHQ/rasa\_core · GitHub](https://github.com/RasaHQ/rasa_core/blob/7451990c9d3948709e4dc59f05f18d8be77e1a45/rasa_core/trackers.py#L84)

---

<div class="post-metadata">

**Author:** ![jsandbrook](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@jsandbrook](https://forum.rasa.com/u/jsandbrook)\
**Post date:** [February 27, 2019, 7:07pm UTC](https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998/3 "2019-02-27T19:07:23Z")

</div>

Thanks, that worked. I hadn’t caught it before. I had to override the init\_tracker() function on my custom tracker store object like below. The default store does not limit the size of trackers.

```auto
class CustomTrackerStore(rasa_core.tracker_store.TrackerStore):
    ...
    def init_tracker(self, sender_id):
      if self.domain:
        return DialogueStateTracker(sender_id,
                                    self.domain.slots,
                                    max_event_history = 100)
      else:
        return None
```

---

<div class="post-metadata">

**Author:** ![ajaxwini](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ajaxwini/32/2162_2.png) [@ajaxwini](https://forum.rasa.com/u/ajaxwini)\
**Post date:** [March 12, 2019, 2:13pm UTC](https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998/4 "2019-03-12T14:13:13Z")

</div>

Hello friend,Could you please tell me how are you fetching specific details from the tracker store. Elaborating my doubt below:

in my run\_app.py (socketIO class) i have used mongotracker like this-

db = MongoTrackerStore(domain=“d.yml”,host=‘mongodb://localhost:27017’, db=‘xyz’, username=“x”,password=“x”,collection=“x”,event\_broker=None)

agent = Agent.load(‘models/dialogue’, interpreter=‘models/current/nlu’,action\_endpoint = action\_endpoint,tracker\_store=db)

now i want to fetch some data like db.sender\_id or db.event. the reason of doing it is to store it column wise on my mongodb.Please help me solving this problem.

---

<div class="post-metadata">

**Author:** ![pwessel](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@pwessel](https://forum.rasa.com/u/pwessel)\
**Post date:** [March 21, 2019, 10:07am UTC](https://forum.rasa.com/t/size-of-trackers-in-custom-tracker-store/4998/5 "2019-03-21T10:07:03Z")

</div>

Hey @ajaxwini. This information should already be stored in your mongodb, so there should be no extra need for you to do so. Please see the documentation about [Tracker Stores](https://rasa.com/docs/core/tracker_stores/) and make sure your `endpoints.yml` includes the correct information. For information on how to fetch specific details from your mongodb maybe have a look at the mongodb docs [db.collection.find() — MongoDB Manual](https://docs.mongodb.com/manual/reference/method/db.collection.find/).
