function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Leanas NixonLeanas Nixon 

Response Size Exceeded 15 MB

We are using a read-only Visualforce page to display list of records summarized by a text field. We having about 1500 unique values (across 3000 record).
We are using dynamic styles for each column to differentiate backgroud based on some criteria (around 30 columns).
We are using maximum HTML tags and apex output format tags to display value in currency format and to enable hyperlink on each values.

Page is working fine with 1100 unique rows. For 1150 unique rows, we are getting the "Response Size Exceeded 15 MB" error in ON and OFF situations. For 1200 rows, we are getting this error everytime. We are trying to reduce the complexity of the page as much as possible (Converting VF tags to HTML). Still we are getting this error.

Is there any other best practise to follow? Do we have the same Response size limit for sandbox and production?
Gonzalo AbrunaGonzalo Abruna
Try to use transient keyword on your controller class as much as possible http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_keywords_transient.htm
and if your visualforce is readonly, setting read-only mode for the entire page might help http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_readonly_context_pagelevel.htm

Regards.
Leanas NixonLeanas Nixon
Thanks for your comment, Gonzalo.

We are using transient to avoid view state error. Previously, we have faced View state error too ;)
We are using read-only key in page as well as in controller. Still we are getting the same error. We are unable to find the reason and workaround for this response size issue. Salesforce document doesn't help much on this.

Thanks,
Leanas Nixon.
Gonzalo AbrunaGonzalo Abruna
Hello Leanas, could you try to send the data in JSON format and see if it is lighter than the 15MB?? Maybe passing the data between server & client through JSON will workaround that issue (but it is true that will require some javascript treatment of the serialized string).

Best regards.

Gonzalo.