We had an interface, while loading the interface in the flow sometimes we are getting Memory Circuit breaker error and we could not able to move forward as we cannot click anything on interface. We already optimized the code to maximum extent. Is there any way that we can show that error in separate section which will not block the interface, so that we can move forward by clicking on submit button
Discussion posts and replies are publicly visible
Hi Shiva Prasad,
What is causing the memory circuit breaker error? Can you help with the root cause, based on the we can think of solutions.
Is it because of too many queries or number of lines of code, or execute SP's in interface?
Stefan Helzle karthikkanjerla
To add details to above description, to that local variables we are gettiong data from below expression rule
To the above rule we are passing the documentID from which we need to extract data, check the below sample document
In this document the 1st row always indicates column headers seperated with comma(A,B,C,D,E) and the rest of rows(rows starting from 2nd line) are actual rows need to be displayed in grid. In this file we have 5 columns with 7 rows but some times we might recieve huge files like 2000columns with 1000rows or more.
When the file has less data it is working fine but during huge data the expression rule is failing at line 8, where we are converting data to list of dictionary using foreach loop and resulting in memory circuit breaker. In such scenerios instead of giving memory circuit breaker error, we should show some user friendly error and allow the user to move forward in the interface.
Stefan Helzle Cas we achieve this or as per your previous response we cant achieve this?
Stefan Helzle karthikkanjerla and any one looking at the this discussion please add your comments
One issue with your approach is, that you store the whole data three times in different local variables. This will not help reducing memory consumption.
But, in general, you have to make sure that these files stay within certain limits. In case that's not an option, you will have to find a different way to do, what you need to do.
Final question Stefan Helzle
If we do it in different way or if we change the logic and at the end, we get the error for some other huge file. Then we can't handle it other than restricting the file to certain limit right? is that the final conclusion
Appian is not made to handle "huge" files in memory. You either have to limit file size, or find a different way of implementation.