Is there a limit on storing data on the "Session" object?
I am trying to store a relatively large JSON on the session.userData object, but I'm getting the following error:
[Error: Request to 'https://state.botframework.com/v3/botstate/facebook/users/10209714280037543' failed: [400] Bad Request]
It works when the session is empty, but somewhere along the way after storing a lot of data, I get this error.
Has anyone else faced this? Any workarounds to make it work?
@matheus208 I believe the limit is 64Kb -- do you know how much data you're attempting to store?
It's 32kb according to https://docs.botframework.com/en-us/restapi/state/
I'm going to close this issue for now, but feel free to open a new issue for further discussion.
If you need to store large amounts of data, you might consider a store specialized for that purpose. For example, sql for relational data, blobs for large binary data, search for semi-structured text data, etc.
so what happens when you cross that limit? does the bot crash? does it delete older entries and keep newer ones?
@slidenerd; In my experience, the error OP posted comes up and your bot won't reply to anything. I was trying to store message history, but once it got over a certain size the bot would freak out and stop doing anything.