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

SSE channel registration takes long time

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      pacific, 1.0-b05/b-06

      Description

      Please see JENKINS-38079 for details.

      *SSE configure call takes really long time (~10sec) for job channel subscription
      (there are two 'job' subscriptions)
      "subscribe": [

      { "jenkins_channel": "job" }

      ,

      { "jenkins_channel": "job" }

      ],
      *SSE configure for pipeline channel is relatively less but still long time (3-4 sec)
      *Avoid redirection by appending ‘/‘. GET /js-extensions costs 61ms
      *(Run details page calls SSE configure API 5 times each taking on average ~2secs.

        Attachments

          Issue Links

            Activity

            Hide
            jamesdumay James Dumay added a comment -

            FYI Tom FENNELLY tracking performance for SSE here.

            Show
            jamesdumay James Dumay added a comment - FYI Tom FENNELLY tracking performance for SSE here.
            Hide
            tfennelly Tom FENNELLY added a comment -

            I honestly think this is down to something else starving requests like this from getting a service thread. That said ... I'm going to refactor the config path so as to remove the lock on the session object, which would only block on multiple requests from the same client i.e. would not block across clients.

            Show
            tfennelly Tom FENNELLY added a comment - I honestly think this is down to something else starving requests like this from getting a service thread. That said ... I'm going to refactor the config path so as to remove the lock on the session object, which would only block on multiple requests from the same client i.e. would not block across clients.
            Hide
            jamesdumay James Dumay added a comment -

            Tom FENNELLY sounds like a good first step to deduce whats going on there. If we can rule out locking at least we can investigate down another route.

            Show
            jamesdumay James Dumay added a comment - Tom FENNELLY sounds like a good first step to deduce whats going on there. If we can rule out locking at least we can investigate down another route.
            Show
            tfennelly Tom FENNELLY added a comment - PR: https://github.com/jenkinsci/blueocean-plugin/pull/512
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Tom Fennelly
            Path:
            src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java
            src/main/java/org/jenkinsci/plugins/ssegateway/EventHistoryStore.java
            src/main/java/org/jenkinsci/plugins/ssegateway/SubscriptionConfigQueue.java
            src/main/java/org/jenkinsci/plugins/ssegateway/sse/EventDispatcher.java
            src/test/java/org/jenkinsci/plugins/ssegateway/EndpointUnitTest.java
            http://jenkins-ci.org/commit/sse-gateway-plugin/4c2e42882f6ff87f9250022b7c0c8949d1b1fb60
            Log:
            JENKINS-38252 Async subs configuration (#11)

            • Removing synchronization around subscription configuration

            Make it async

            • Removed unneeded synchronization around channel subs counters
            • Capture authentication when the dispatcher is created

            Doing it async results in it being done outside the context of a user request, resulting in every subscription being created for ANONYMOUS and therefore many events not being delivered because of permissions restrictions.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: src/main/java/org/jenkinsci/plugins/ssegateway/Endpoint.java src/main/java/org/jenkinsci/plugins/ssegateway/EventHistoryStore.java src/main/java/org/jenkinsci/plugins/ssegateway/SubscriptionConfigQueue.java src/main/java/org/jenkinsci/plugins/ssegateway/sse/EventDispatcher.java src/test/java/org/jenkinsci/plugins/ssegateway/EndpointUnitTest.java http://jenkins-ci.org/commit/sse-gateway-plugin/4c2e42882f6ff87f9250022b7c0c8949d1b1fb60 Log: JENKINS-38252 Async subs configuration (#11) Removing synchronization around subscription configuration Make it async Removed unneeded synchronization around channel subs counters Capture authentication when the dispatcher is created Doing it async results in it being done outside the context of a user request, resulting in every subscription being created for ANONYMOUS and therefore many events not being delivered because of permissions restrictions.

              People

              • Assignee:
                tfennelly Tom FENNELLY
                Reporter:
                vivek Vivek Pandey
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: