Another thing - this only happens if nobody is logged onto the server. We log back in and there are thousands of blocks just sitting loosely on the ground, causing terrible lag. It seems that the quarry still runs when nobody is connected to the server.
If we idle near the quarry, this problem doesn't happen.