You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2020/12/16 14:04:30 UTC

Tolerating significant system time adjustment

All,

I'm working with a partner to troubleshoot a SAML-based service where 
their SAML responses are reaching us after timing-out. I tracked that 
down to an incorrect system time on many of their servers.

Once fixing the clocks -- hopefully using ntpd or similar which can 
smear time adjustments out over time to avoid huge, sudden clock changes 
-- would they need to restart their Java VMs running Tomcat?

The only thing I can think of is that the "fast time format" used to 
produce "Date" response headers and access-log timestamps might be 
disturbed, but a quick look at the code doesn't lead me to believe that 
it would suffer from a large system clock change. It doesn't, for 
example, assume that every call to System.currentTimeMillis() / 
System.nanoTime() returns a value larger (or equal to) than any previous 
call.

Can anyone think of any reason why Tomcat (or the JVM) would need to be 
restarted?

Thanks,
-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tolerating significant system time adjustment

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

On 12/16/20 11:04, Mark Thomas wrote:
> On 16/12/2020 14:04, Christopher Schultz wrote:
>> All,
>>
>> I'm working with a partner to troubleshoot a SAML-based service where
>> their SAML responses are reaching us after timing-out. I tracked that
>> down to an incorrect system time on many of their servers.
>>
>> Once fixing the clocks -- hopefully using ntpd or similar which can
>> smear time adjustments out over time to avoid huge, sudden clock changes
>> -- would they need to restart their Java VMs running Tomcat?
>>
>> The only thing I can think of is that the "fast time format" used to
>> produce "Date" response headers and access-log timestamps might be
>> disturbed, but a quick look at the code doesn't lead me to believe that
>> it would suffer from a large system clock change. It doesn't, for
>> example, assume that every call to System.currentTimeMillis() /
>> System.nanoTime() returns a value larger (or equal to) than any previous
>> call.
>>
>> Can anyone think of any reason why Tomcat (or the JVM) would need to be
>> restarted?
> 
> Restarted? No.
> 
> You might see things like:
> - longer/shorter (possibly negative) request processing times
> - earlier than expected session timeouts
> - etc.

Thanks for the confirmation. Any temporary weirdness (e.g. negative 
processing times) would be (somewhat) expected and ignored.

Their application... well, know knows what assumptions that makes :)

Thanks,
-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tolerating significant system time adjustment

Posted by Mark Thomas <ma...@apache.org>.
On 16/12/2020 14:04, Christopher Schultz wrote:
> All,
> 
> I'm working with a partner to troubleshoot a SAML-based service where
> their SAML responses are reaching us after timing-out. I tracked that
> down to an incorrect system time on many of their servers.
> 
> Once fixing the clocks -- hopefully using ntpd or similar which can
> smear time adjustments out over time to avoid huge, sudden clock changes
> -- would they need to restart their Java VMs running Tomcat?
> 
> The only thing I can think of is that the "fast time format" used to
> produce "Date" response headers and access-log timestamps might be
> disturbed, but a quick look at the code doesn't lead me to believe that
> it would suffer from a large system clock change. It doesn't, for
> example, assume that every call to System.currentTimeMillis() /
> System.nanoTime() returns a value larger (or equal to) than any previous
> call.
> 
> Can anyone think of any reason why Tomcat (or the JVM) would need to be
> restarted?

Restarted? No.

You might see things like:
- longer/shorter (possibly negative) request processing times
- earlier than expected session timeouts
- etc.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org