3

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?

  • Did you get the cause of this? I am facing the same issue inspite of server calls not returning many records – Sarang Dec 29 '16 at 7:21
  • In our case we are dynamically creating cmps. We are also looking for more information on this as we do not know exactly what and what not does count in this limit. – Christian Szandor Knapp Mar 27 '17 at 20:42
1

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:

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.