Newer Version Available
Action Limits and Considerations
Client Payload Data Limit
Use action.setParams() to set data for an action to be passed to a server-side controller.
The framework batches the actions in the queue into one server request. The request payload includes all of the actions and their data serialized into JSON. The request payload limit is 4 MB.
Action Limit in a Boxcar Request
The framework returns a 413 HTTP response status code if there are more than 250 actions in a boxcar request. If a user sees this rare error, consider redesigning your custom component to follow best practices and reduce the number of actions in a request.
Actions and the Component Lifecycle
If your action isn’t executing, make sure that you’re not executing code outside the framework’s normal rendering lifecycle. For example, if you use window.setTimeout() in an event handler to execute some logic after a time delay, wrap your code in $A.getCallback().
You don't need to use $A.getCallback() if your code is executed as part of the framework's call stack; for example, your code is handling an event or in the callback for a server-side controller action.