Light network loading on server start causing server hang up.
Electrofried opened this issue ยท 9 comments
The default tick time for the server crash detection is 60 seconds.
With complex light networks on a server, the light network load on startup seems to cause the initial tick to exceed this and cause the server to restart thinking it has crashed.
Issue is very easily resolved by increasing the max tick time but I thought I should post an issue anyway so you are aware and in case others have the issue in the future.
It is a fairly specific issue, the way it is handled currently seems fine. The problem only arises if you have a server that is set to auto restart on crash and more than a few players each with light networks. The issue is not really with the way it is loaded and more with how forge handles the tick calculation for detecting server crashes.
I really just pointed it out so you were aware in case others start an issue with their 'servers crashing' on startup with astral sorcery installed.
The default tick time for the server crash detection is 60 seconds.
It should never ever take longer than 60 seconds though.. all i'm doing is kinda basic math. I get the feeling something might be broken? Idk... how many people play on your server and how much have they set up?
Seeing as the entire start of my pack is based around your mod, there are many floating crystals linked to many lenses and other blocks or locations. Some people have gone a bit crazy. It is probably much more than intended and there are about ten or twelve active players on at different times. There are other mods that contribute to the initial load time, yours is just the one that tips it over the 60s limit for the initial tick and causes the server to think it has crashed.
Well.. I suppose i don't have much to say to it then.. As explained above, i need to load/initialize the network cache and build paths so the light network works as intended... After all, it's a bit more than your average RF cable.
It is a tradeoff between runtime performance and initial startup time.
I need to calculate the network at some point. The network doesn't need to load any chunks or anything related (unless you enabled 'performNetworkIntegrityCheck' which is.. unadviseable to use unless unintended stuff seems to happen with the network consistently or if you edited the world via MCEdit or w/e).
So, sure, i can not do it during startup, but then it happens as small lags throughout people logging in or related. The other option would be to calculate it 'on demand' - which is due to the nature of the network not easily defined - but then it'd, as said before, happen whenever something gets loaded that needs starlight. The network doesn't fall into an endless-recursion throughout lenses/prisms in case you're wondering about that.
So.. ultimately i'm uncertain what i should do about it.
@kreezxil so...ever going to provide what's been asked for?
this is a bad issue, when it first happened i boosted my server ticks fro 60k to 90k, it happened again, I boosted to 120k this time to get it going. I'm on 1.11.2, so if this has been addressed in the 1.12 builds can you at least do a backport?
It's not adressed because it's not an issue to be adressed due to reasons stated above.
A network that exceeds this should be massive though. So a copy of that world's light network data would be desireable for that sense (can be found in ${worldfolder}/AstralSorceryData/DIM_${DimensionId}/lightnetwork.dat)