Custom Export To Excel Download Error

1
HI Team, I am using a custom search to Filter a list and then pass the list to custom java action which is reponsible to Write the data into a file object and then downlaod the file as a csv ( The custom java action is used to write the Filetered data in csv format and then push it to the file object ) .The downlaod is smooth as butter when I have a list of  7- 10 thousand records, but the execution of microflow fails when the filtered list is  more than 10- 15 thousand recods .The execution abruptly stops with Contact system Administrator error. After subsequenmt hits the server got crashed beacuse of Java heap outof memory, which I found when checking the log files.  As of now we have doubled the resources to server but in future , Records might increse more than 0.1 million. Help me out how to tune the below microlfow or sugestions on how to over come this issue with different solution. Thanks in Advance!!!   I used a sub microflow to retrieve the filetered list which has atleast 50 thousand data. The filtered list is  retrieved via a OQL java action. Note: The list is not commited any where since it will take more time to complete the flow.    Please find the error log for reference : CRITICAL - ActionManager: Error in execution of monitored action '{"type":"DeleteAction"}' (execution id: 3223cc44-363c-46b9-a144-ce3903681755, execution type: CUSTOM) CRITICAL - ActionManager: java.lang.OutOfMemoryError: Java heap space                at java.base/java.lang.StringCoding.decode(Unknown Source)                at java.base/java.lang.String.<init>(Unknown Source)                at java.base/java.lang.String.<init>(Unknown Source)                at com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:757)                at com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:3748)                at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:247)                at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:190)                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2053)                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2039)                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getString(SQLServerResultSet.java:2494)                at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:888)                at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:888)                at com.mendix.connectionbus.connections.jdbc.executionmanagement.ResultSetToDataTableConverter.getResultSetValue(ResultSetToDataTableConverter.scala:28)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.fillDataTable(JdbcDataStore.java:354)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execRetrieveQuery(JdbcDataStore.java:313)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execRetrieveQueries(JdbcDataStore.java:190)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.retrieve(JdbcDataStore.java:149)                at com.mendix.connectionbus.retrieve.QueryRequestExecutor.executeQueriesForLocal(QueryRequestExecutor.scala:102)                at com.mendix.connectionbus.retrieve.QueryRequestExecutor.executeQueries(QueryRequestExecutor.scala:35)                at com.mendix.connectionbus.retrieve.QueryRequestExecutor.execute(QueryRequestExecutor.scala:27)                at com.mendix.connectionbus.retrieve.DataStoreCaller.$anonfun$processOqlGetRequest$1(DataStoreCaller.scala:45)                at com.mendix.connectionbus.retrieve.DataStoreCaller$$Lambda$1420/0x0000000100b41840.apply(Unknown Source)                at scala.Option.map(Option.scala:230)                at com.mendix.connectionbus.retrieve.DataStoreCaller.processOqlGetRequest(DataStoreCaller.scala:42)                at com.mendix.connectionbus.retrieve.DataStoreCaller.$anonfun$getResult$1(DataStoreCaller.scala:35)                at com.mendix.connectionbus.retrieve.DataStoreCaller$$Lambda$938/0x0000000100985840.apply(Unknown Source)                at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:245)                at scala.collection.TraversableLike$$Lambda$598/0x000000010077b840.apply(Unknown Source)                at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)                at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)                at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:38)                at scala.collection.TraversableLike.flatMap(TraversableLike.scala:245)   CRITICAL - M2EE: Java heap space ERROR - M2EE: An error occurred while executing action 'start'. ERROR - M2EE: com.mendix.m2ee.api.AdminException:                at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:160)   Caused by: java.lang.OutOfMemoryError: Java heap space                at java.base/java.lang.StringCoding.decode(Unknown Source)                at java.base/java.lang.String.<init>(Unknown Source)                at java.base/java.lang.String.<init>(Unknown Source)                at com.microsoft.sqlserver.jdbc.DDC.convertStreamToObject(DDC.java:757)                at com.microsoft.sqlserver.jdbc.ServerDTVImpl.getValue(dtv.java:3748)                at com.microsoft.sqlserver.jdbc.DTV.getValue(dtv.java:247)                at com.microsoft.sqlserver.jdbc.Column.getValue(Column.java:190)                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2053)                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2039)                at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getString(SQLServerResultSet.java:2494)                at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:888)                at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:888)                at com.mendix.connectionbus.connections.jdbc.executionmanagement.ResultSetToDataTableConverter.getResultSetValue(ResultSetToDataTableConverter.scala:28)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.fillDataTable(JdbcDataStore.java:354)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execRetrieveQuery(JdbcDataStore.java:313)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execRetrieveQueries(JdbcDataStore.java:190)                at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.retrieve(JdbcDataStore.java:149)                at com.mendix.connectionbus.retrieve.QueryRequestExecutor.executeQueriesForLocal(QueryRequestExecutor.scala:102)                at com.mendix.connectionbus.retrieve.QueryRequestExecutor.executeQueries(QueryRequestExecutor.scala:35)                at com.mendix.connectionbus.retrieve.QueryRequestExecutor.execute(QueryRequestExecutor.scala:27)                at com.mendix.connectionbus.retrieve.DataStoreCaller.$anonfun$processOqlGetRequest$1(DataStoreCaller.scala:45)                at com.mendix.connectionbus.retrieve.DataStoreCaller$$Lambda$1420/0x0000000100b41840.apply(Unknown Source)                at scala.Option.map(Option.scala:230)                at com.mendix.connectionbus.retrieve.DataStoreCaller.processOqlGetRequest(DataStoreCaller.scala:42)                at com.mendix.connectionbus.retrieve.DataStoreCaller.$anonfun$getResult$1(DataStoreCaller.scala:35)                at com.mendix.connectionbus.retrieve.DataStoreCaller$$Lambda$938/0x0000000100985840.apply(Unknown Source)                at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:245)                at scala.collection.TraversableLike$$Lambda$598/0x000000010077b840.apply(Unknown Source)                at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:36)                at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:33)                at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:38)                at scala.collection.TraversableLike.flatMap(TraversableLike.scala:245)   INFO - Core: Mendix Runtime is shutting down now... INFO - Core: Mendix Runtime is now shut down. INFO: The application has been stopped successfully. INFO: stopping app...  
asked
1 answers
1

It indeed looks like the data set is too large to handle. You have several options such as decreasing  the size of the dataset, split it into batches or increase the memory of the server.

You can also consider transfering the data using database replication, rest or another type of interface.

It al depends on your specific situation.

answered