Persist more than 24kb of data between intents in a session
I'm getting intent failures with no corresponding error messages in logs (using alexa-skills-kit-sdk-for-nodejs and Lambda).
In troubleshooting, it looks like I may be exceeding the max allowed size of the JSON Response object. I see from the docs that the total size of your response cannot exceed 24 kilobytes.
I'm using session attributes to store data I need, and in some circumstances that data is larger than 24kb. The same documentation as referenced above says: When returning your response, you can include data you need to persist during the session in the sessionAttributes property. The attributes you provide are then passed back to your skill on the next request.
We need a way to store more than 24kb between intents in a session and not pass it in as part of the JSON Request object. Obviously if it goes in to the request it is going to come out as part of the response object and exceed the size limit.
I already persist data with DynamoDB, pulling in data to a new session each time. I don't want to have to go to the DB after every intent in the same session!
Cyrus Adkisson commented
I believe these my issue is the same as this issue, although I'm experiencing it differently.
I'm not persisting that much data in the session, but I've got some fairly large karaoke-style APL documents and commands that are exceeding the 24kb response limit. I've had to resort to some non-intuitive workarounds which my users are complaining about.
HUGE additional +1 from me!
Marco Manca commented
I have the same issue. I'm storing multiple data in order to access them after the user answer Yes to the yes intent and I'm getting the following:
AskSdk.DefaultRequestDispatcher Error: RequestHandlerChain not found!
It drove me crazy, only after a lot of tests I realized that it was related to the amount of data stored in the session attributes. I reduced the data stored and the error disappeared.
Hashimoto Naoki commented
We also deeply bother about this issue.
Since Amazon released smart display and we include APL into the response.
But the limitation of the data (24KB) is not changed.
So, we often experienced skill crush due to this limitation.
This is not good for both user and developer in current situation.
Dana Young commented
A bit more information - this has become a major cost issue for us, and is making it impractical to scale our service / Alexa skill with the current AWS architecture. We are paying hundreds of dollars per month (above the $100/mo credit we receive as an Alexa developer) in AWS DynamoDB charges because we have to go to the DB for every intent.