Page stops loading if you use a filter.

I have a skuid page for client encounters. It has about 6 filters, all applied to the client encounter model. The page has been slow… but today it stopped loading entirely… or at least the little spinner just keeps spinning and the filtered records never appear if i clone the page and take off all the filters, and all the models that drive the drop downs for the lookup fields… then the page will load, and typing a name in the generic filter loads some results any ideas on why today is so much worse than other days … ?

I seem to be getting this error Visualforce Remoting Exception: line 4638, column 1: String length exceeds maximum: 6000000 (skuid) $VFRM.Util.error even if i reduce the number of fields returned which seems to point here: $VFRM.Util={log:function(a,b){if(!(“undefined”===typeof console||!console.groupCollapsed||!console.log||!console.groupEnd))if(“undefined”!==typeof b&&null!==b)try{console.groupCollapsed(a),console.log(b),console.groupEnd()}catch(c){}else try{console.log(a)}catch(d){}},warn:function(a){if(“undefined”!==typeof console&&console.warn&&a)try{console.warn(a)}catch(b){}},error:function(a,b){if(“undefined”!==typeof console&&console.error&&a)if(b)try{console.error(a,b)}catch(c){}else try{console.error(a)}catch(d){}}, but i don’t know how to figure out which “string” is causing the problem

this seems to be a combination of a bunch of records with big text fields in them and a model which had not restriction on the number of records to load… adding a restriction to load only 100 brought the form back to where it would run the filter

I’m glad you were able to solve the problem Ken.  One of the down-sides of working on the Salesforce platform is that so much of the infrastructure is a black box. There are some things we know about efficiency and optimization - but so many times a single bad experience means the data is being cached,  meaning that the next time the page loads INSTANTLY…  Ugh. 

In general, your Models should have a “Max # of Records (Limit)” property on them that’s something like 100. We do NOT recommend removing this setting, as (1) it’s wasteful — usually your users don’t need to look at any more than 10-100 records at a time, and if they need to look at more records, they can Filter, Search, or click “Load More” to find them (2) it will make your page load LOTS slower (3) it can, as you discovered today, cause your pages not to load at all. There is a hard and fast limit of 6MB of data that Salesforce will allow to be transmitted, in a single transaction, between the client and server. So if the result of your Model’s query is more than 6MB of data, that query is going to fail — plus it is going to take a while for that data to get between the client and server! By the way, if you are thinking “what a small limit!” this is actually over 40 times as much data as regular Visualforce will permit to be transmitted to the client (the View State limit is 135KB). Conclusion: always have a low Limit (e.g. 10-100) on all of your Models.