Is WebSocket transport idle timeout configurable?

When using the “new” WebSocket agents transport, it appears there’s some idle timeout set (which I think is 5 minutes), I’ve encountered this in pipeline where there’s no output for over 5 minutes, and the job is killed.

While I understand the purpose of the timeout, I have some long running processes (which sadly aren’t mine and don’t provide any verbosity setting), I’d also hate to have another process running just spewing output every few seconds to combat this, is there a way for this to be configured?
I haven’t found any

Do you use Kubernetes?
If that’s the case, you could maybe track this issue.
The workaround seems to be setting a value for two parameters:

-Dkubernetes.websocket.timeout=60000 -Dorg.csanchez.jenkins.plugins.kubernetes.pipeline.ContainerExecDecorator.websocketConnectionTimeout=90

@poddingue , how about a windows agent? my websocket agent looses connection in between and jobs are failing.
Using this command for connectivity
java -jar agent.jar -url http://host:8080/ -secret secret -name agenthost -workDir “c:\jenkins”

Jenkins has a ChannelPinger that gets installed upon connection of an agent to the controller. This should ensure that there is traffic on the line regularly.
The default interval is 5 minutes. It can be changed with the java property hudson.slaves.ChannelPinger.pingIntervalSeconds, when reducing this also adjust hudson.slaves.ChannelPinger.pingTimeoutSeconds so the timeout is shorter than the interval.

1 Like