My scripts were not executing at all for a while.



  • When I logged into the game a few minutes ago, I noticed all my creeps had stopped moving, and most of my rooms only had a few creeps left in them. They had about 200-300 ticks of lifetime remaining (which was ticking down, so the servers were still running fine) but weren't moving.

    Looking at the map I saw that my neighbor's creeps were still moving around normally.

    The console was not showing any output (I have output whenever a creep is spawned or CPU bucket gets low).

    So I started to type a few commands in the console to see if that worked:

    • > Game.cpu.bucket
    • > console.log('foo');

    I got no return values from these statements even while time was still ticking on the server!

    At this point, I open my main.js (using the steam client), insert a "console.log('initializing');" at the top, save, and suddenly everything starts running again, including the console commands I entered a minute or so earlier:
    • [10:40:53 AM] initializing!
    • [10:40:53 AM] E45S47 Spawning new creep: harvester_m9
    • [10:40:53 AM] E46S41 Spawning new creep: transporter_ar
    • [10:40:53 AM] E46S47 Spawning new creep: transporter_as
    • [10:40:53 AM] E48S45 Spawning new creep: transporter_at
    • [10:40:53 AM] E48S48 Spawning new creep: transporter_au
    • [10:40:53 AM] E49S47 Spawning new creep: harvester_ma
    • [10:40:53 AM] foo
    • < 9515
    • < undefined

    So somehow my scripts stopped executing, but time kept running, and re-saving the main script started everything up again.

    I wonder what could have caused this. Could I have completely run out of CPU bucket, stopping my script completely? In that case, I think that justifies a special email message.

    I did receive a "Script execution has been terminated: CPU limit reached"-email at 9:30, but I've been getting these from time to time during the last few days and was thinking it's just some pathfinding running amok every couple of days or so (happens even at full bucket).