Karaf
  1. Karaf
  2. KARAF-1216

add-features-to-repo goal does not reclaim file handles fast enough

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.2.6, 3.0.0
    • Component/s: karaf-tooling
    • Labels:
      None

      Description

      For larger feature sets like for the ServiceMix Full distro, the number of file handles accumulated can exceed the OS defaults on some systems. The culprit seems to be that for every bundle a Maven ArtifactResolver is used to download that bundle and the file used during that process is not reclaimed until the goal finishes executing. I see the following in ServiceMix:

      [INFO] Apache ServiceMix :: Features :: Assemblies :: Apache ServiceMix (Full) FAILURE [1:02.352s]
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 27:03.531s
      [INFO] Finished at: Tue Feb 21 18:07:56 UTC 2012
      [INFO] Final Memory: 121M/554M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.karaf.tooling:features-maven-plugin:2.2.4:add-features-to-repo (add-features-to-repo) on project apache-servicemix-full: Error populating repository: /x1/asf/servicemix/smx4/features/trunk/assemblies/apache-servicemix-full/target/features-repo/org/eclipse/jetty/jetty-continuation/7.4.5.v20110725/jetty-continuation-7.4.5.v20110725.jar (Too many open files) -> [Help 1]

      Attaching a simple fix shortly...

      1. KARAF-1216.patch
        1 kB
        Jonathan Anstey

        Activity

        Hide
        Jonathan Anstey added a comment -

        Thanks JB.

        Show
        Jonathan Anstey added a comment - Thanks JB.
        Hide
        Jonathan Anstey added a comment -

        Oh, the patch was for the 2.2.x branch btw.

        Show
        Jonathan Anstey added a comment - Oh, the patch was for the 2.2.x branch btw.
        Hide
        Jonathan Anstey added a comment -

        Simple patch to kick the GC into reclaiming the file handles during goal execution.

        Well, its a hack, but it does the job

        Show
        Jonathan Anstey added a comment - Simple patch to kick the GC into reclaiming the file handles during goal execution. Well, its a hack, but it does the job

          People

          • Assignee:
            Jean-Baptiste Onofré
            Reporter:
            Jonathan Anstey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development