We have created an application with:
Corda Version is 3.2
The CordApp has:
the list of object (approx 3000 objects) is splitted into lists with size of 450 (because of ActiveMQ Artemis error for lists with bigger size [java.lang.IllegalArgumentException: Record is too large to store])
after the first flow, we launch another flow with a similar logic. In this case we have a list of StateAndRef (results of a query with RPCops) received as an input within the flow and used as output for the transaction.
Randomly we received Java Heap Space error and SslHandshakeCompletionEvent(javax.net.ssl.SSLException: handshake timed out) . This seems a serious memory leak.
We can do the entire workflow only using params -Xmx10240m (10GB) on our local machine. Monitoring the resource, it seems that the heap grows esponentially specially during the transactions.
What could be the reason for this crash?
Is not possible to use Corda with lists with this size?
The solution was to add the override of toString and hashCode not only in the Entity class for the States, but also in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.