glassfish
  1. glassfish
  2. GLASSFISH-18875

EAR Deployment slow. Hangs during EJB Deployment. Possible Fix inside.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 4.0
    • Component/s: cdi
    • Labels:
      None
    • Environment:

      Glassfish 3.1.2 on various machines.

      Description

      Hello,

      We are developing a big JEE Application (around 80 Meg), with around 200 EJBs, 3 Webapplications, all the good stuff.
      For quite a while now our deployment took forever, around 50 Minutes for a full deployment.

      Today I took the time to profile glassfish and came across something interesting. Almost all of the time was spent in DeploymentImpl Class of weld-integration, specifically the getBeanDeploymentArchives(boolean printDebug) Method.
      That method by default tries to log something, using the toString() of the beanDeploymentArchives Object.

      The toString() uses up a lot of time, and seems to be bugged/badly implemented.

      By disabling the Debug Output our Deployment Time went from 50Min to 2 Min, of which 1 is spent decompressing the ear.

      Please verify, thank you.

        Activity

        Hide
        daedalus added a comment - - edited

        Tested and confirmed!

        This is unbelievable. I can now deploy my application in under 3 min. Before the change it took about 60min!

        Please fix this incredible bug.

        EDIT: I also noticed, that glassfish uses now 800MB less!! RAM during the deployment process.

        Show
        daedalus added a comment - - edited Tested and confirmed! This is unbelievable. I can now deploy my application in under 3 min. Before the change it took about 60min! Please fix this incredible bug. EDIT: I also noticed, that glassfish uses now 800MB less!! RAM during the deployment process.
        Hide
        AlexP added a comment -

        Awesome it works for others as well!

        Show
        AlexP added a comment - Awesome it works for others as well!
        Hide
        AlexP added a comment -

        The weld-integration.jar with the patch (disabled debug output) so others can try this too.

        Show
        AlexP added a comment - The weld-integration.jar with the patch (disabled debug output) so others can try this too.
        Hide
        AlexP added a comment -

        @Daedalus

        I believe those 800 megs were leftovers from the broken toString...have you noticed your application running faster as well?

        Show
        AlexP added a comment - @Daedalus I believe those 800 megs were leftovers from the broken toString...have you noticed your application running faster as well?
        Hide
        Hong Zhang added a comment -

        Wow, this sounds great and thanks for submitting the patch to make GlassFish better! I will let CDI team to follow up and take appropriate action.

        Show
        Hong Zhang added a comment - Wow, this sounds great and thanks for submitting the patch to make GlassFish better! I will let CDI team to follow up and take appropriate action.
        Hide
        jjsnyder83 added a comment -

        Thanks for the information. I will look into getting this fix in asap.

        Show
        jjsnyder83 added a comment - Thanks for the information. I will look into getting this fix in asap.
        Hide
        SimY4 added a comment -

        Patch won't work for me. Still having troubles with EJB deployment here. Is there any other possible fixes for this?

        Show
        SimY4 added a comment - Patch won't work for me. Still having troubles with EJB deployment here. Is there any other possible fixes for this?
        Hide
        jjsnyder83 added a comment -

        I have made the change to DeploymentImpl in both the 3.1.2-SUSTAINING branch and the trunk.

        Show
        jjsnyder83 added a comment - I have made the change to DeploymentImpl in both the 3.1.2-SUSTAINING branch and the trunk.

          People

          • Assignee:
            jjsnyder83
            Reporter:
            AlexP
          • Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: