Jenkins is shutting down with an error

I have Jenkins installed on ECS cluster and from last one week my Jenkins is auto restarting every 24 hours. I checked the logs and can be see below error.

2024-10-01 09:56:29.191+0000 [id=48] INFO winstone.Logger#logInternal: JVM is terminating. Shutting down Jetty
2024-10-01 09:56:29.191+0000 [id=48] INFO org.eclipse.jetty.server.Server#doStop: Stopped Server@157853da{STOPPING}[10.0.13,sto=0]
2024-10-01 09:56:29.200+0000 [id=48] INFO o.e.j.server.AbstractConnector#doStop: Stopped ServerConnector@192c3f1e{HTTP/1.1, (http/1.1)}{0.0.0.0:8080}
2024-10-01 09:56:29.202+0000 [id=48] INFO hudson.lifecycle.Lifecycle#onStatusUpdate: Stopping Jenkins

Offhand, I"m not sure why this would happen. But I did find the following thread on Jenkin’s community list; see if it might be relevant to your situation.

Hi Rob,

Thank you so much for the update. I checked that community link preciously however it didn’t help me and unable to find the root cause for this issue. Can you please help me, if you have any idea?

Regards.
Venkateswar

You need to check the ECS cluster logs. Those messages look like a normal shutdown to me. ECS is probably just rearranging containers to optimize compute usage. That is normal behaviour for a container management system like ECS or Kubernetes. If the server must remain up at the time this is happening, then it needs to be tuned in ECS task settings. I’m not an expert on the workings of ECS so I cannot tell you exactly what you need to do.