CordApp Java Heap Space error and javax.net.ssl.SSLException












1















We have created an application with:




  • 2 nodes + 1 Notary

  • 2 web application (one for each node)


Corda Version is 3.2



The CordApp has:




  • the first flow, receiving in input a list of objects, used to create a list of State. This list will be the output of the transaction

  • 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.


  • either in this case we split the list (approx 3000 objects) in sub lists of 450 elements.


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?










share|improve this question

























  • Do you get the heap space error when running the first flow or the second flow?

    – Joel
    Nov 14 '18 at 15:41











  • it depends on the -size of Xmx parameter. Like I said I call the first flow in sequence N times (each one with 450 elements). After two Flow submitting, usually it crash.

    – Antonio Grandinetti
    Nov 14 '18 at 15:55













  • And what exactly are you returning via RPC? Do you return the entire transaction/all the states as a list? If you stop doing that, does it help?

    – Joel
    Nov 14 '18 at 15:57











  • I added in the post the way I manage the result of each Flow.

    – Antonio Grandinetti
    Nov 14 '18 at 16:10











  • Thanks for the help. The solution was to add the override of toString and hashCode not only in the Entity class for the States, but either in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.

    – Antonio Grandinetti
    Nov 14 '18 at 18:24
















1















We have created an application with:




  • 2 nodes + 1 Notary

  • 2 web application (one for each node)


Corda Version is 3.2



The CordApp has:




  • the first flow, receiving in input a list of objects, used to create a list of State. This list will be the output of the transaction

  • 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.


  • either in this case we split the list (approx 3000 objects) in sub lists of 450 elements.


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?










share|improve this question

























  • Do you get the heap space error when running the first flow or the second flow?

    – Joel
    Nov 14 '18 at 15:41











  • it depends on the -size of Xmx parameter. Like I said I call the first flow in sequence N times (each one with 450 elements). After two Flow submitting, usually it crash.

    – Antonio Grandinetti
    Nov 14 '18 at 15:55













  • And what exactly are you returning via RPC? Do you return the entire transaction/all the states as a list? If you stop doing that, does it help?

    – Joel
    Nov 14 '18 at 15:57











  • I added in the post the way I manage the result of each Flow.

    – Antonio Grandinetti
    Nov 14 '18 at 16:10











  • Thanks for the help. The solution was to add the override of toString and hashCode not only in the Entity class for the States, but either in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.

    – Antonio Grandinetti
    Nov 14 '18 at 18:24














1












1








1








We have created an application with:




  • 2 nodes + 1 Notary

  • 2 web application (one for each node)


Corda Version is 3.2



The CordApp has:




  • the first flow, receiving in input a list of objects, used to create a list of State. This list will be the output of the transaction

  • 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.


  • either in this case we split the list (approx 3000 objects) in sub lists of 450 elements.


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?










share|improve this question
















We have created an application with:




  • 2 nodes + 1 Notary

  • 2 web application (one for each node)


Corda Version is 3.2



The CordApp has:




  • the first flow, receiving in input a list of objects, used to create a list of State. This list will be the output of the transaction

  • 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.


  • either in this case we split the list (approx 3000 objects) in sub lists of 450 elements.


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?







java blockchain rpc heap-memory corda






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 14 '18 at 18:19







Antonio Grandinetti

















asked Nov 14 '18 at 13:52









Antonio GrandinettiAntonio Grandinetti

267




267













  • Do you get the heap space error when running the first flow or the second flow?

    – Joel
    Nov 14 '18 at 15:41











  • it depends on the -size of Xmx parameter. Like I said I call the first flow in sequence N times (each one with 450 elements). After two Flow submitting, usually it crash.

    – Antonio Grandinetti
    Nov 14 '18 at 15:55













  • And what exactly are you returning via RPC? Do you return the entire transaction/all the states as a list? If you stop doing that, does it help?

    – Joel
    Nov 14 '18 at 15:57











  • I added in the post the way I manage the result of each Flow.

    – Antonio Grandinetti
    Nov 14 '18 at 16:10











  • Thanks for the help. The solution was to add the override of toString and hashCode not only in the Entity class for the States, but either in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.

    – Antonio Grandinetti
    Nov 14 '18 at 18:24



















  • Do you get the heap space error when running the first flow or the second flow?

    – Joel
    Nov 14 '18 at 15:41











  • it depends on the -size of Xmx parameter. Like I said I call the first flow in sequence N times (each one with 450 elements). After two Flow submitting, usually it crash.

    – Antonio Grandinetti
    Nov 14 '18 at 15:55













  • And what exactly are you returning via RPC? Do you return the entire transaction/all the states as a list? If you stop doing that, does it help?

    – Joel
    Nov 14 '18 at 15:57











  • I added in the post the way I manage the result of each Flow.

    – Antonio Grandinetti
    Nov 14 '18 at 16:10











  • Thanks for the help. The solution was to add the override of toString and hashCode not only in the Entity class for the States, but either in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.

    – Antonio Grandinetti
    Nov 14 '18 at 18:24

















Do you get the heap space error when running the first flow or the second flow?

– Joel
Nov 14 '18 at 15:41





Do you get the heap space error when running the first flow or the second flow?

– Joel
Nov 14 '18 at 15:41













it depends on the -size of Xmx parameter. Like I said I call the first flow in sequence N times (each one with 450 elements). After two Flow submitting, usually it crash.

– Antonio Grandinetti
Nov 14 '18 at 15:55







it depends on the -size of Xmx parameter. Like I said I call the first flow in sequence N times (each one with 450 elements). After two Flow submitting, usually it crash.

– Antonio Grandinetti
Nov 14 '18 at 15:55















And what exactly are you returning via RPC? Do you return the entire transaction/all the states as a list? If you stop doing that, does it help?

– Joel
Nov 14 '18 at 15:57





And what exactly are you returning via RPC? Do you return the entire transaction/all the states as a list? If you stop doing that, does it help?

– Joel
Nov 14 '18 at 15:57













I added in the post the way I manage the result of each Flow.

– Antonio Grandinetti
Nov 14 '18 at 16:10





I added in the post the way I manage the result of each Flow.

– Antonio Grandinetti
Nov 14 '18 at 16:10













Thanks for the help. The solution was to add the override of toString and hashCode not only in the Entity class for the States, but either in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.

– Antonio Grandinetti
Nov 14 '18 at 18:24





Thanks for the help. The solution was to add the override of toString and hashCode not only in the Entity class for the States, but either in the class containing these Entities (the one extends MappedSchema). Now the nodes never exceed 1.2 GB of used memory.

– Antonio Grandinetti
Nov 14 '18 at 18:24












1 Answer
1






active

oldest

votes


















2














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.






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301837%2fcordapp-java-heap-space-error-and-javax-net-ssl-sslexception%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    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.






    share|improve this answer






























      2














      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.






      share|improve this answer




























        2












        2








        2







        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.






        share|improve this answer















        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.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 15 '18 at 11:03









        Joel

        10.5k11228




        10.5k11228










        answered Nov 14 '18 at 18:26









        Antonio GrandinettiAntonio Grandinetti

        267




        267






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53301837%2fcordapp-java-heap-space-error-and-javax-net-ssl-sslexception%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Tangent Lines Diagram Along Smooth Curve

            Yusuf al-Mu'taman ibn Hud

            Zucchini