Symptoms
Full error message in Internet Explorer:
An unexpected error occurred while attempting to execute a server-side operation.
/0] Error: Not enough storage is available to complete this operation. (error)
Full error message in Firefox:
An unexpected error occurred while attempting to execute a server-side operation.
/0] ]Exception... "Out of Memory" nsresult: "0x8007000e (NS_ERROR_OUT_OF_MEMORY)" location: "JS frame :: https://k2.domain.com/Runtime/Bundles/Js/Common?v=XYI4P8yQ-1KPwxr16jhKs4AgtfP4U5x26StNe-dKW8k1&_v=4.14060.14218.6 :: .send/u :: line 2" data: no] (error)
Diagnoses
I've got a few suggestions which involve some deeper analysis of this issue:
- Could you please enable the Developer tools in your browser (in IE it's F12) and send me some data regarding that? It could be that the AJAX script is sending a lot of data through and somehow your form is running out of memory.
- Could you also please check if the K2HostServer.exe process on your K2 server abnormally increases in CPU and RAM usage during the execution of this form/view?
- Finally, please run a SQL Profiler Analysis while executing this Form/View to see which calls are being made to the K2 Database and what data it returns.
Please send all the above plus the K2 Host Server logs to K2 support.
We need to pinpoint what exactly causes this out of memory error.
You mentioned it worked after you disabled some rules on the form. Could you elaborate which rules? Since what I found is that when you have Checkbox Lists (or CBLs), then sometimes K2 can return a huge amount of data, this is a known bug (for at least 4.6.7 and earlier). For that reason I believe it would be a good thing if you could run a SQL Profiler Analysis during the time you open/access the form (with all the rules in place) to see how active the SQL server / K2 DB is during that time and find out how many values it returns. If this is an abnormally high number, it would indicate that all this data is being loaded straight into the form (except of course if other K2 processes are running during this time) thereby causing the memory usage limit to be exceeded.
Resolution
When a form is initializing, we have a rule to 'Get List' from shared SmartObjects in our Production environment that returns a lot of data. In QA environment, the shared SmartObjects do not return a lot of data, so no 'memory issue' at all. Thus, I've removed the unnecessary form rules and the form is now able to load well.