Page 1 of 1

14.21 Headless server connection drop issue

Posted: Fri Dec 09, 2016 10:12 pm
by Ice Forge
Running into an odd connection drop? something happening with my headless server that is running a very long term save at the moment, havent had any issues so far with it until today and it simply drops players after a few min with no crashes or anything; then it takes a while for the server to actually drop them from the internals and after which they can proceed to reconnect again and rinse/repeat.

Any idea's?
The server is running a few mods that has been very friendly to each other, however the save is past 500 hrs now so im a bit concerned :7

Code: Select all

  45.838 ConnectionRequestReplyConfirm (type(ConnectionRequestReplyConfirm) ) from(86.141.103.52:59641)
  45.839 Info ServerRouter.cpp:413: Replying to connectionRequest for address(86.141.103.52:59641).
  45.840 Info ServerSynchronizer.cpp:524: nextHeartbeatSequenceNumber(349) adding peer(1)
  45.862 Info ServerMultiplayerManager.cpp:658: mapTick(109028486) changing state from(InGame) to(InGameSavingMap)
  45.962 Info ServerMultiplayerManager.cpp:742: mapTick(109028486) received stateChanged peerID(1) oldState(Ready) newState(ConnectedWaitingForMap)
  55.793 Info ServerMultiplayerManager.cpp:779: MapTick(109028486) Serving map(C) for peer(1) size(30688114) crc(889420560)
  55.794 Info ServerMultiplayerManager.cpp:658: mapTick(109028486) changing state from(InGameSavingMap) to(InGame)
  55.936 Info ServerMultiplayerManager.cpp:742: mapTick(109028492) received stateChanged peerID(1) oldState(ConnectedWaitingForMap) newState(ConnectedDownloadingMap)
  64.536 Info ServerMultiplayerManager.cpp:742: mapTick(109028841) received stateChanged peerID(1) oldState(ConnectedDownloadingMap) newState(ConnectedLoadingMap)
  75.668 Info ServerMultiplayerManager.cpp:742: mapTick(109029308) received stateChanged peerID(1) oldState(ConnectedLoadingMap) newState(TryingToCatchUp)
 104.663 Info ServerMultiplayerManager.cpp:742: mapTick(109030522) received stateChanged peerID(1) oldState(TryingToCatchUp) newState(WaitingForCommandToStartSendingTickClosures)
 104.665 Info GameActionHandler.cpp:2556: MapTick(109030522) processed PlayerJoinGame peerID(1) playerIndex(8) mode(connect)
 104.826 Info ServerMultiplayerManager.cpp:742: mapTick(109030528) received stateChanged peerID(1) oldState(WaitingForCommandToStartSendingTickClosures) newState(InGame)
 121.198 Info ServerMultiplayerManager.cpp:822: Disconnect notification for peer (1)
 121.199 Info ServerMultiplayerManager.cpp:742: mapTick(109031213) received stateChanged peerID(1) oldState(InGame) newState(DisconnectScheduled)
 121.200 Info ServerSynchronizer.cpp:539: nextHeartbeatSequenceNumber(2091) removing peer(1).
Edit : probably should have posted it under technical support stuff, but i would think its a middle ground thing.
Not sure if i can do anything about this issue from my end :7
It seems to happen regardless of actions being taken on the server as well, just sitting idly connected will cause it to drop the connection(assuming that is the core issue? Not sure if its the update ticks that no longer gets requested?).

Re: 14.21 Headless server connection drop issue

Posted: Fri Dec 09, 2016 11:14 pm
by Ice Forge
Update :
http://images.akamai.steamusercontent.c ... 5B349D20C/

Tried running it as a normal listened server and it seems like its trying to do some major calculations that is causing the fps/ups to drop like a rock every so often, it freezes up and
simply cannot respond to players connected due to that.

http://www.filedropper.com/divineinterv ... aveandmods

Is the rar file containing the save itself (named freiheit.zip) and the Mods file is the rar containing the mods currently being used.
anyone able to brainstorm me out of this would be a hero :D

Re: 14.21 Headless server connection drop issue

Posted: Sat Dec 10, 2016 2:19 am
by Ice Forge
Image
New image with the debug stuff to the left.

The entity update is off the chart?

Re: 14.21 Headless server connection drop issue

Posted: Sat Dec 10, 2016 12:30 pm
by daniel34
There's definitely something strange going on with your save. Every few seconds there is a tick that takes >1 minute to process on my machine, and it doesn't seem to be a mod-related script that's causing it. The other ticks inbetween look fine.

I tried to load the save without mods but it's still loading after 5 minutes...
EDIT: finished loading after ~10-15min, there is no slowdown at all but the whole factory is without power, so it's difficult to say what the actual problem is.

Re: 14.21 Headless server connection drop issue

Posted: Sun Dec 11, 2016 7:40 pm
by Rseding91
There are multiple inserters that are registered as "sleeping" in the same belt 10s of thousands of times. Do you know what steps might have happened to get to this state? What did you do just before it started happening?

Because this is the first time I've seen this particular issue it makes me suspect your server might have RAM issues and some bits got flipped. Could you try running a memory test on the server as well?

Re: 14.21 Headless server connection drop issue

Posted: Sun Dec 11, 2016 8:59 pm
by Rseding91
With the help of Posila we reproduced the issue. You've got a mod that disables/enables inserters and that currently doesn't work correctly in the inserter sleep logic resulting in the inserter going to sleep when it's already supposed to be sleeping.

Re: 14.21 Headless server connection drop issue

Posted: Sun Dec 11, 2016 9:08 pm
by Rseding91
Fixed for 0.15.

Re: 14.21 Headless server connection drop issue

Posted: Sun Dec 11, 2016 11:02 pm
by Pallando
Fixed for 0.15
Thank you!

Re: 14.21 Headless server connection drop issue

Posted: Mon Dec 12, 2016 4:44 am
by Ice Forge
Thank you for the reply and the issue is most likely due to RAM related issues, was running low on the server rig and threw in more after the fact but i guess the damage was already done.
Any hint to which mod was the issue?

Re: 14.21 Headless server connection drop issue

Posted: Mon Dec 12, 2016 6:24 am
by Rseding91
Ice Forge wrote:Thank you for the reply and the issue is most likely due to RAM related issues, was running low on the server rig and threw in more after the fact but i guess the damage was already done.
Any hint to which mod was the issue?
Any mod that disables/enables inserters using entity.active will trigger the bug. I'm not sure what all mods you've got that may do that but searching for active = in the mods should show you all of them that might trigger it.

Re: 14.21 Headless server connection drop issue

Posted: Mon Dec 12, 2016 8:58 am
by Ice Forge
Yup, thanks a lot again still amazes me to see how quick you guys are at nailing stuff down.
A big hurray to you all on the staff !