Closed dly9014 closed 7 years ago
Hi, Were you able to figure this out? I'm also running into the dreaded cannot exceed 24 Kilobytes issues. Thanks,
I have a workaround as described above. Does it make sense for you? To get the full size of the JSON Request object Brian@Amazon suggested something like this on alexaResponse in https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/blob/master/lib/response.js
@dly9014 If you have a large skill state, one idea would to have your skill store state in a dynamodb table instead of through session attributes. This would bump you up to a 400KB limit according to (dynamoDB documentation)
I'm closing this for now but feel free to re-open if you have more questions
Need to add error handling to throw an error if a Request is packaged up that will result in the the Response being larger than 24 kilobytes.
I'm getting intent failures with no corresponding errors. In troubleshooting I've found that in certain cases I am 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.
Is there any 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 have a workaround for the issue above to check if max allowable size is exceeded and if so to set this.attributes = null before this.emit(':ask/tell') and then reload them from the DB when the response comes back, but I don't want to have to go to the DB after every intent in the same session!
Also what is the object that I can refer to with something like (JSON.stringify(this.).length to get the full size of the JSON request object (not just the size of attributes)?