EOSERV Forum > EOSERV > Time deltas?
Page: << 1 >>
Time deltas?
Author Message
Post #203053 Time deltas?

I've been running a server on a linode and when left for a few days the console shows reports like this:

[WRN] A time delta of 1305 ms was detected and ignored.

[WRN] A time delta of 1738 ms was detected and ignored.

I'm not sure exactly how frequent but it seems to be happening 2-3 times an hour? Might sound daft but I'm not quite sure what it means? is it eoserv freezing and detecting it's froze? Also does anyone have an idea of what could cause this? I'm running a vanilla 535 trunk on a 1gb linode that's only running a website on it, so I don't understand what could cause it?


EDIT: forgot to mention I haven't noticed any spikes in resources either.

---
https://havenshost.co.uk/ -  Affordable, High end web hosting!
1 year, 29 weeks ago
Post #203055 Re: Time deltas?

Originates from the following function in timer.cpp:

  1. unsigned int Clock::GetTimeDelta()
  2. {
  3.     unsigned int ticks = clock_ticks();
  4.     unsigned int delta = ticks - last;
  5.  
  6.     if ((int)delta < 0)
  7.     {
  8.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  9.         delta = 0;
  10.     }
  11.  
  12.     if ((int)delta > max_delta)
  13.     {
  14.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  15.         delta = max_delta;
  16.     }
  17.  
  18.     last = ticks;
  19.  
  20.     return delta;
  21. }
---
Want to learn to pixel?
Pixelsource.org
1 year, 29 weeks ago
Post #203056 Re: Time deltas?
Cirras posted: (28th Mar 2017, 10:40 pm)

Originates from the following function in timer.cpp:

  1. unsigned int Clock::GetTimeDelta()
  2. {
  3.     unsigned int ticks = clock_ticks();
  4.     unsigned int delta = ticks - last;
  5.  
  6.     if ((int)delta < 0)
  7.     {
  8.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  9.         delta = 0;
  10.     }
  11.  
  12.     if ((int)delta > max_delta)
  13.     {
  14.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  15.         delta = max_delta;
  16.     }
  17.  
  18.     last = ticks;
  19.  
  20.     return delta;
  21. }

xD I Imagined it would be in timer.cpp being a timer n all. But you haven't exactly answered any of the questions :<
---
https://havenshost.co.uk/ -  Affordable, High end web hosting!
1 year, 29 weeks ago
Post #203057 Re: Time deltas?
callum posted: (28th Mar 2017, 10:56 pm)

Cirras posted: (28th Mar 2017, 10:40 pm)

Originates from the following function in timer.cpp:

  1. unsigned int Clock::GetTimeDelta()
  2. {
  3.     unsigned int ticks = clock_ticks();
  4.     unsigned int delta = ticks - last;
  5.  
  6.     if ((int)delta < 0)
  7.     {
  8.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  9.         delta = 0;
  10.     }
  11.  
  12.     if ((int)delta > max_delta)
  13.     {
  14.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  15.         delta = max_delta;
  16.     }
  17.  
  18.     last = ticks;
  19.  
  20.     return delta;
  21. }

xD I Imagined it would be in timer.cpp being a timer n all. But you haven't exactly answered any of the questions :<

That's pretty much all there is to it. The function runs any time you call Timer::GetTime() (so, pretty frequently) and warns if there was noticeable lag between ticks. If you're seeing this a lot you could have added code that causes EOSERV to perform poorly. Or, it could be because the server is resource constrained.

I've seen the warning in two cases: putting my computer to sleep (with EOSERV running) or stepping through code in the debugger. If it happens every couple of hours it probably isn't a big issue.

---
class EOSERV {
Programmer | Oldbie
Open source EO Client: https://github.com/ethanmoffat/EndlessClient
};
1 year, 29 weeks ago
Post #203059 Re: Time deltas?
ethanmoffat posted: (28th Mar 2017, 11:42 pm)

callum posted: (28th Mar 2017, 10:56 pm)

Cirras posted: (28th Mar 2017, 10:40 pm)

Originates from the following function in timer.cpp:

  1. unsigned int Clock::GetTimeDelta()
  2. {
  3.     unsigned int ticks = clock_ticks();
  4.     unsigned int delta = ticks - last;
  5.  
  6.     if ((int)delta < 0)
  7.     {
  8.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  9.         delta = 0;
  10.     }
  11.  
  12.     if ((int)delta > max_delta)
  13.     {
  14.         Console::Wrn("A time delta of %i ms was detected and ignored.", delta);
  15.         delta = max_delta;
  16.     }
  17.  
  18.     last = ticks;
  19.  
  20.     return delta;
  21. }

xD I Imagined it would be in timer.cpp being a timer n all. But you haven't exactly answered any of the questions :<

That's pretty much all there is to it. The function runs any time you call Timer::GetTime() (so, pretty frequently) and warns if there was noticeable lag between ticks. If you're seeing this a lot you could have added code that causes EOSERV to perform poorly. Or, it could be because the server is resource constrained.

I've seen the warning in two cases: putting my computer to sleep (with EOSERV running) or stepping through code in the debugger. If it happens every couple of hours it probably isn't a big issue.


ahh cheers for clearing it up, I'm using a vanilla 535 trunk so I'm not sure why the servers causing this to happen.. I need to look into why I think!
---
https://havenshost.co.uk/ -  Affordable, High end web hosting!
1 year, 29 weeks ago
Post #203060 Re: Time deltas?

This essentially means your program has lagged for #ms. If you see this error, something has cause the program to stall its processes. Most likely an underpowered machine running multiple tasks at once, or something decides to be a resource hog at random on you machine, or sleep mode, etc. It basically it telling you something external is causing severe server lag so fix your shit.

1 year, 29 weeks ago
Post #203063 Re: Time deltas?

The server I'm using definitely has enough resources, it's a plain Linode running only a web server (as said in first post). There's no resource spikes shown on  anything either, I guess I'll just have to monitor it I guess.

---
https://havenshost.co.uk/ -  Affordable, High end web hosting!
1 year, 29 weeks ago
Page: << 1 >>

EOSERV Forum > EOSERV > Time deltas?