What does the action limitation of 4kB for user_metadata and app_metadata per session actually mean?

Problem statement

With reference to statement in the actions limitations. Can you please explain how this limitation will play out in an implementation? We are currently depending on the app_metadata containing authorization data that may be severely limited if the actual size of app_metadata has to be 4kB or lower.

If this limitation only affects the size that can be processed in Action session and the actual app_metdata is larger how would you guide us to work around this issue? Also, what would be the appropriate error handling or workaround approach to avoid this issue entirely?

Solution

The app_metadata and user_metadata have a combined size limit of 16MB. More on that here:

You are only able to save (persist) 4KB of data to each of the user_metadata and app_metadata per execution of an Action (as each metadata field can save 4KB each). More on that here: