Jenkins container restarts every 24 hrs

We have setup Jenkins as a docker container in our infra. We recently upgraded Jenkins from

jenkins/jenkins:2.177 to jenkins/jenkins:2.331 version. After the upgrade we see an strange issue (We have never faced this issue with previous installed version). The issue is - After every 24 hrs, Jenkins container gets restarted automatically without anything in logs (Someday it does not but mostly everyday).

I checked everywhere in Jenkins, there’s no place where I could find and schedule restart policy. And during this restart of Jenkins docker container, all my running jobs gets lost (Basically the restart does not wait for any Jenkins job to finish), we do no even find the build history of that execution. I in-fact can see the build number in JENKINS_HOME/jobs/${jobname}/builds/ but I cannot see that build number on Jenkins console.

I am not sure if this is happening because of DockerContainerWatchdog or something else (I tried this solution - Jenkins: How to disable DockerContainerWatchdog from running - Stack Overflow but it didn’t work), this is happening only in case of Jenkins container only (My machine/instance is running few other containers too but only Jenkins container gets restarted every 24hrs).

Could you please help me understand why this is happening ? How can I stop this Jenkins container restart.

Poking at the link I think that’s for Docker agents not Jenkins itself.

I’m not aware of any process other than plugin install that restarts Jenkins, so my suggestion is looking into the system that runs Jenkins. Does your host have any sort of Cron, or if you are running as a container (guessing from above) make sure you don’t have any sort of restart setup for Docker.

Is it exactly at a time, then likely Cron
If it’s 24 hours it is probably not, I’m thinking resource limits

@halkeye Thanks for responding. I checked for any plugin or cron which may cause this Jenkins container restart, but I could not find any relevant cron or plugin. Also Yes, it is exactly at the same time 12:35PM (I monitored).
Restart policy for my Jenkins container is set to always but I don’t think any issue with it - all other running container on the same machine are also having the same restart policy but those containers are up from past few weeks.

When monitoring closely, I found that there’s no issue with Jenkins version but one of the job in our Jenkins. The job had no issues before but somehow it is not working as expected now and causing Jenkins container to restart.