How to limit the tracker size in action server requests

Problem

In my setup I am using rasa 2.8, mongodb as trackerstore and a self written action server. There are some rules that trigger a custom action and the tracker is sent to the action server. Here I only need maybe the last 100 events, but it seems that rasa always sends the whole tracker. After a while this results in a payload that is far to big for the action server to handle, so that it crashes (even if it wouldn’t crash then sending so big payloads isn’t that efficient).

What I found out

  • I can set a session expiration time. But this only works if there is a break in the conversation. And it resets the whole session, so after a reset the last events are lost for the action server.
  • I can limit the history in ted policies. But this is just for the decision making before the action server is called.

Question

The tracker in the database should contain all info, but the tracker that is sent to the action server should only contain the latest events. How can I archieve this?

Compression was added in 3.2.12

Thanks for your suggestion. As I understand this feature, it will only compress the data, but won’t crop older events. So as the history grows the crash will only be delayed but the problem still isn’t solved, or am I wrong?

You’re correct. I saw an enhancement request recently about limiting the history. You may want to add a Jira request for this.

Here is the new jira ticket