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

Too many open files when using Resource root URL

    • 2.222

      Last week I changed our jenkins instance (big one) to using Resource root URL, and since then we had one big crash because of cannot open more files error.

      We are using Simple Theme Plugin with Extra CSS file pointing to userContent/styles.css file..
      And I see that on OS level this styles.css file is opened more than 900 times.. (increasing with each new session I assume)
      That files are never closing..

      I was first thinking about bug in Simple Theme Plugin but it just adds code to download that css file.. so I assume bug is in code in Resource root URL implementation (that css is now read via that new redirection)

       

      Changing to Inline CSS and fixes the problem, but I assume it may manifest in much more places...

       

      Extra data:

      Every request ro url redirected to `resource URL root` ends up never closing.

      We are using nginx reverse proxy, im trying to investigate it that may be issue..

       

       

       

       

          [JENKINS-61121] Too many open files when using Resource root URL

          cc danielbeck as potentially interested

          Wadeck Follonier added a comment - cc danielbeck as potentially interested

          Daniel Beck added a comment -

          Every request ro url redirected to `resource URL root` ends up never closing.

          Could you clarify what that means?

          When I try to access a file in /userContent, it quickly returns:

          $ curl --location -i http://localhost:8080/userContent/readme.txt
          HTTP/1.1 302 Found
          Date: Tue, 18 Feb 2020 13:17:27 GMT
          X-Content-Type-Options: nosniff
          Location: http://127.0.0.1:8080/static-files/7VrrCoWq4mzHbJJL3IpSLVJy4MKfIu5SkHrStDHQ9IoxNTgyMDMxODQ3Mjg4Ojk6YW5vbnltb3VzOnVzZXJDb250ZW50/readme.txt
          Content-Length: 0
          Server: Jetty(9.4.25.v20191220)
          
          HTTP/1.1 200 OK
          Date: Tue, 18 Feb 2020 13:17:27 GMT
          X-Content-Type-Options: nosniff
          Last-Modified: Tue, 18 Feb 2020 10:27:45 GMT
          Expires: Tue, 18 Feb 2020 10:27:45 GMT
          Accept-Ranges: bytes
          Content-Type: text/plain
          Content-Length: 82
          Server: Jetty(9.4.25.v20191220)
          
          Files in this directory will be served under your http://yourjenkins/userContent/ 

          Daniel Beck added a comment - Every request ro url redirected to `resource URL root` ends up never closing. Could you clarify what that means? When I try to access a file in  /userContent , it quickly returns: $ curl --location -i http://localhost:8080/userContent/readme.txt HTTP/1.1 302 Found Date: Tue, 18 Feb 2020 13:17:27 GMT X-Content-Type-Options: nosniff Location: http://127.0.0.1:8080/static-files/7VrrCoWq4mzHbJJL3IpSLVJy4MKfIu5SkHrStDHQ9IoxNTgyMDMxODQ3Mjg4Ojk6YW5vbnltb3VzOnVzZXJDb250ZW50/readme.txt Content-Length: 0 Server: Jetty(9.4.25.v20191220) HTTP/1.1 200 OK Date: Tue, 18 Feb 2020 13:17:27 GMT X-Content-Type-Options: nosniff Last-Modified: Tue, 18 Feb 2020 10:27:45 GMT Expires: Tue, 18 Feb 2020 10:27:45 GMT Accept-Ranges: bytes Content-Type: text/plain Content-Length: 82 Server: Jetty(9.4.25.v20191220) Files in this directory will be served under your http://yourjenkins/userContent/

          Daniel Beck added a comment -

          Found it.

          Daniel Beck added a comment - Found it.

          Daniel Beck added a comment -

          Keeping this labeled as lts-candidate in case something's wrong with 2.222.

          Daniel Beck added a comment - Keeping this labeled as  lts-candidate in case something's wrong with 2.222.

            danielbeck Daniel Beck
            ingwar Karol Lassak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: