timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-12310] Dangling socket connections to jenkins after using cli jar? #7042

Open timja opened 12 years ago

timja commented 12 years ago

after using CLI in a loop to update dozens or hundreds of jobs, frequently see (lsof) many many open socks to the jenkins.war process and see (netstat) many tcp sockets in TIME_WAIT.

not sure if I'm interpreting it correctly, but if I am, perhaps

jenkins / cli / src / main / java / hudson / cli / CLI.java

might consider using

http://docs.oracle.com/javase/1.4.2/docs/api/java/net/Socket.html#setSoTimeout%28int%29

with a reasonable short value (10s?) so that when the client finishes, the jenkins.war process can release resources from its end faster?


Originally reported by moncreaff, imported from: Dangling socket connections to jenkins after using cli jar?
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 12 years ago

moncreaff:

Another point of information. The socket cleanups do seem to occur, but NOT while a job is running. I have a single executor and a job that takes a couple of hours. The sockets from the CLI invocations appeared to accumulate and remained open until the that job finished and then were finally released.

Could this be a threading issue?