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

PTC integrity plugin creates multiple API Sessions and does not end the session after jenkins job is complete

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • integrity-plugin
    • None

      Hello All,

      I am using
      PTC-Integrity 10
      Build:10.7.0.7925 (LTS)
      API version :4.15.7925

      PTC Integrity CM - Jenkins Plugin: Version 2.0.2

      My jenkins build runs fine in the front end, but the issue is it creates several API sessions when i run the jenkins job and does not kill these API sessions after the job is done. My IT support guys are not happy with several API sessions lying idle. any suggestions?

          [JENKINS-42097] PTC integrity plugin creates multiple API Sessions and does not end the session after jenkins job is complete

          PTC ALM added a comment -

          Hi Sudarshan,

          The plugin kills off the active API sessions once a job is completed. This may take some time depending on the number of active sessions, but it usually doesn't take much time to clean up. How long after the job are these sessions still active? Is there any other integration/activity on the same Integrity Server that is firing api calls?

          PTC ALM added a comment - Hi Sudarshan, The plugin kills off the active API sessions once a job is completed. This may take some time depending on the number of active sessions, but it usually doesn't take much time to clean up. How long after the job are these sessions still active? Is there any other integration/activity on the same Integrity Server that is firing api calls?

          Hi,
          Thank you for quick response.
          Actually in plugin by default checkout thread count is 5 , i had not altered it, hence i guess it creates 5 parallel API sessions, which after the job is completed stood idle. please correct me if i am wrong...

          sudarshan bangera added a comment - Hi, Thank you for quick response. Actually in plugin by default checkout thread count is 5 , i had not altered it, hence i guess it creates 5 parallel API sessions, which after the job is completed stood idle. please correct me if i am wrong...

          Hi,

          I have several other jenkins jobs lined up after each other. Which leads to increase in number of API Sessions. Same issues i face when i use multiple SCM plugin for jenkins job.

          sudarshan bangera added a comment - Hi, I have several other jenkins jobs lined up after each other. Which leads to increase in number of API Sessions. Same issues i face when i use multiple SCM plugin for jenkins job.

          PTC ALM added a comment -

          Hi Sudarshan,

          Yes the default checkout thread count is 5. However, that number is a subset of the API session count, since API session would be required for firing any Integrity command in the plugin (projectinfo, viewproject, checkpoint and others).
          Getting back to the original issue, how long after the job termination are you still seeing open API sessions and how many? Is there any other activity happening on the Integrity Server that is firing api calls?

          PTC ALM added a comment - Hi Sudarshan, Yes the default checkout thread count is 5. However, that number is a subset of the API session count, since API session would be required for firing any Integrity command in the plugin (projectinfo, viewproject, checkpoint and others). Getting back to the original issue, how long after the job termination are you still seeing open API sessions and how many? Is there any other activity happening on the Integrity Server that is firing api calls?

          Hi,

          j13 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 11:32:08 AM idle 46m35s api
          j14 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 11:32:29 AM idle 46m37s api
          j15 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 11:32:38 AM idle 46m36s api
          j16 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 2017 11:32:44 AM idle 46m37s api
          j17 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 2017 11:32:52 AM idle 46m37s api

          Above mentioned is 5 API session when i ran one jenkins job. It says idle for 46min approx. Actually job is running on integrity test server. so nothing much running in it.

          sudarshan bangera added a comment - Hi, j13 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 11:32:08 AM idle 46m35s api j14 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 11:32:29 AM idle 46m37s api j15 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 11:32:38 AM idle 46m36s api j16 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 2017 11:32:44 AM idle 46m37s api j17 Sudarshan.bangera xxx.in.yyy.v Feb 16, 2017, 2017 11:32:52 AM idle 46m37s api Above mentioned is 5 API session when i ran one jenkins job. It says idle for 46min approx. Actually job is running on integrity test server. so nothing much running in it.

          Code changed in jenkins
          User: asen
          Path:
          README.md
          pom.xml
          src/main/java/hudson/scm/IntegrityCheckoutTask.java
          src/main/java/hudson/scm/api/session/APISession.java
          src/main/java/hudson/scm/api/session/ISessionPool.java
          http://jenkins-ci.org/commit/integrity-plugin/3dcdd7848296a11bda1c9df324be09eea1ef0818
          Log:
          Adding im disconnect while terminating sessions JENKINS-42097

          Change-Id: I2d217695ed29f11c625bdc77e7367684e0903040

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: asen Path: README.md pom.xml src/main/java/hudson/scm/IntegrityCheckoutTask.java src/main/java/hudson/scm/api/session/APISession.java src/main/java/hudson/scm/api/session/ISessionPool.java http://jenkins-ci.org/commit/integrity-plugin/3dcdd7848296a11bda1c9df324be09eea1ef0818 Log: Adding im disconnect while terminating sessions JENKINS-42097 Change-Id: I2d217695ed29f11c625bdc77e7367684e0903040

            integrity_jenkins_plugin PTC ALM
            sid8304 sudarshan bangera
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: