I just ran into an error with a lightning component
"Input too long. [1, 1000000]"
What are the limits on number of components that can be rendered and size of responses?
What action are you performing when you see this error?
I've seen the same when trying to upload a file through a Lightning component and the issue was down to the file size being too large for the heap size limit when it was being passed to the APEX controller.
The request and response sizes count towards to the total heap size so in essence they have the same limits, the Salesforce Developer Guide states that this is 6MB for synchronous and 12MB for asynchronous calls:
I came across this error with a component which used a lot of dynamic components.
When a dynamic component reference is not easily determined before run-time, Lightning framework has to do a server trip to get the component definition (see: Dynamically Creating Components). These requests are bundled for all dynamic components displayed on the page.
The problem with this in our case was that we had a table, where every row included a few dynamic components. And while these were in fact only 3-4 different types of components, Lightning framework was creating a definition request for every single instance of them, which quickly resulted in a massive payload for the call - even for relatively small number of rows (ca. 100 was where our page would break with the
Input too long. [1, 1000000] error)
The solution (as suggested in the documentation for dynamic components) was to use the aura:dependecy tag to explicitly list the dynamic components that our page required. This results in all components being created client-side.