Sun/Moon lag

Discussion in 'Plugin Development' started by Derek Peterson, Feb 18, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Derek Peterson

    My server has started having issues with the days and nights being too long. It can sometimes take up to an hour for the moon to cross the sky. (It moves a little bit, and then jumps back to where it started, over and over)

    I've tested this with no plugins enabled, and the problem still occurs.

    Does anybody have any ideas of if/how I can fix this via a plugin?

    The only option I can think of is to have a timer script manually set the time to a specific hour every X seconds so the moon appears to progress across the sky. Is this the only way to deal with this?

    Thanks in advance,
    Derek
     
  2. Offline

    Plague

    This is some really strange bug, so there's no need to fix it by a plugin, you need to find the root of the problem.

    Doesnt server.log tell you something went wrong?
    What happens when you run minecraft_srver instead of craftbukkit?
     
  3. Offline

    Derek Peterson

    Thanks for your help :)

    The only problem I can see in the console is the old:
    Code:
    2011-02-18 18:26:18 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    Which seems to be spammed if anything is even remotely laggy.

    I'll try running minecraft_server.jar and see if anything changes.
     
  4. Offline

    Plague

    Yes, when the lag happens it could affect the sun, but in the scale you are talking about you'd have to have a pretty slow machine, can you write what CPU, RAM, OS you are running?
     
  5. Offline

    Derek Peterson

    All my server's info is listed here: http://p.derekp.com/phpsysinfo/ (TL;DR: 4gb ram, quad-core opteron vps running Ubuntu 10.10 Server)

    Other than the sun/moon being jittery, there's no noticable lag even though there's 30+ people online.

    I ran `dstat` for a minute:
    [​IMG]

    Thanks again for your help, I really appreciate it!
     
  6. Offline

    Edward Hand

    The sun/moon lag occurs when the server's tick rate is running too slow. It's supposed to run at 2o ticks/second but if its running slower, time will pass slower (affecting mob movement speed, smelting speed, day/night cycle etc).

    Even if the server tick rate is running at say 3 ticks/second, that wont create very much chat lag or block lag etc, since the servers response time may still be 1/3 of a second (if you see what I mean).

    The server I play on recently had this problem. It was fixed when we moved to a new map. You might like to try running with a different map and see if it improves - if so then this indicates that your current map may be corrupted. Beyond that I have no ideas.

    I created a client mod to track server tickrate through the f3 menu (which is far more useful than most of the crap in there currently). It doesn't affect the server in any way and is independent of latency in your connection. You may download it here if you wish: http://www.srcf.ucam.org/~eh392/minecraft/Blinky.zip
     
  7. Offline

    QQCucumber

  8. Offline

    Plague

    I still wonder how this bug happens, so I could prevent it from happening to me.
     
Thread Status:
Not open for further replies.

Share This Page