On Ubuntu, if you are using Jenkins package, you can change the session timeout in /etc/default/jenkins
.
JENKINS_ARGS=" BLA BLA -- --sessionEviction=604800"
I tried –sessionTimeout and it does not work.
Where BLA BLA is the existing args and --sessionEviction=604800
is the new session timeout. The default is 30 minutes and I was timing out a lot while testing Jenkinsfile. Unlke sessionTimeout, sessionEviction’s unit is in seconds not minutes. 604800 is 60*60*24*7 so the timeout is a week.