Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-14336

Too many open files upon HTTP listener init or shutdown

    XMLWordPrintable

Details

    Description

      Trying to navigate to Jenkins web site, browser keeps loading and loading. When checked on Jenkins console it showed that Jenkins failed with the following:

      Jul 6, 2012 1:49:28 PM winstone.Logger logInternal
      SEVERE: Error during HTTP listener init or shutdown
      java.net.SocketException: Too many open files
              at java.net.PlainSocketImpl.socketAccept(Native Method)
              at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
              at java.net.ServerSocket.implAccept(ServerSocket.java:462)
              at java.net.ServerSocket.accept(ServerSocket.java:430)
              at winstone.HttpListener.run(HttpListener.java:136)
              at java.lang.Thread.run(Thread.java:662)
      

      I have verified open files and it seems that unreasonable large number of descriptors is open to various jar files, with jenkins-core being the leader:

      $ ls -la /proc/26867/fd | grep jar | wc -l
      876
      $ ls -la /proc/26867/fd | grep jenkins-core | wc -l
      462
      $ ls -la /proc/26867/fd | grep stapler | wc -l
      173

      Attachments

        Issue Links

          Activity

            To increase the maximum file descriptors, adjust ulimit. In a large deployment of Jenkins, 1024 is too small.

            See http://stackoverflow.com/questions/11017402/increase-ulimit-for-of-file-descriptors for example.

            If you think there's a file descriptor leak, please open separate tickets. See https://wiki.jenkins-ci.org/display/JENKINS/I'm+getting+too+many+open+files+error for the information we need to track down the problem.

            kohsuke Kohsuke Kawaguchi added a comment - To increase the maximum file descriptors, adjust ulimit. In a large deployment of Jenkins, 1024 is too small. See http://stackoverflow.com/questions/11017402/increase-ulimit-for-of-file-descriptors for example. If you think there's a file descriptor leak, please open separate tickets. See https://wiki.jenkins-ci.org/display/JENKINS/I'm+getting+too+many+open+files+error for the information we need to track down the problem.

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            core/pom.xml
            http://jenkins-ci.org/commit/jenkins/02e00449e412fa3d18d9c4a04a670eaad899ec91
            Log:
            [FIXED JENKINS-14336]

            Integrating the stapler fix.

            Compare: https://github.com/jenkinsci/jenkins/compare/793b6826e567...02e00449e412

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/pom.xml http://jenkins-ci.org/commit/jenkins/02e00449e412fa3d18d9c4a04a670eaad899ec91 Log: [FIXED JENKINS-14336] Integrating the stapler fix. Compare: https://github.com/jenkinsci/jenkins/compare/793b6826e567...02e00449e412
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2942
            [FIXED JENKINS-14336] (Revision 02e00449e412fa3d18d9c4a04a670eaad899ec91)

            Result = UNSTABLE
            kohsuke : 02e00449e412fa3d18d9c4a04a670eaad899ec91
            Files :

            • core/pom.xml
            • changelog.html
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2942 [FIXED JENKINS-14336] (Revision 02e00449e412fa3d18d9c4a04a670eaad899ec91) Result = UNSTABLE kohsuke : 02e00449e412fa3d18d9c4a04a670eaad899ec91 Files : core/pom.xml changelog.html
            jglick Jesse Glick added a comment - - edited

            Verified fixed. To reproduce, just start Jenkins, enable auto refresh, and wait for a refresh to occur; ls -l /proc/$pid/fd|grep jenkins-core|wc -l will increase by 2 (until the next garbage collection).

            jglick Jesse Glick added a comment - - edited Verified fixed. To reproduce, just start Jenkins, enable auto refresh, and wait for a refresh to occur; ls -l /proc/$pid/fd|grep jenkins-core|wc -l will increase by 2 (until the next garbage collection).

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            http://jenkins-ci.org/commit/jenkins/0485bfd44169bd00562327860b2848f8657c7944
            Log:
            [FIXED JENKINS-14336]

            Integrating the stapler fix.

            (cherry picked from commit 02e00449e412fa3d18d9c4a04a670eaad899ec91)

            Conflicts:
            changelog.html
            core/pom.xml

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: http://jenkins-ci.org/commit/jenkins/0485bfd44169bd00562327860b2848f8657c7944 Log: [FIXED JENKINS-14336] Integrating the stapler fix. (cherry picked from commit 02e00449e412fa3d18d9c4a04a670eaad899ec91) Conflicts: changelog.html core/pom.xml

            People

              kohsuke Kohsuke Kawaguchi
              raspy Krzysztof Malinowski
              Votes:
              13 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: