Mitissa Posted November 16, 2021 Share Posted November 16, 2021 Hey DCS Server Admins! I wanted to pick your brain(s) if possible because I've run into an issue hosting a dedicated server that both works and doesn't work at the same time. I first noticed the issue when I would fly low-resource Liberation maps. I'd take off, complete roughly a half-hour of mission and then I would start to notice aircraft just stopping mid-air. It was akin to a lag-spike but the communication to the server remained unaffected. After roughly a minute or so I would find myself still flying in the direction I was but all the aircraft around me started flying backwards (I'm assuming to sync what's on the server vs what's on my end). Seconds later I'd be a crater and I'd press 'Tab' to look at the action log where it says I was downed by a Manpad or another aircraft. Regardless of how complex or simple the mission is, these 'skips' still occur... so onto the things I've tried! So again, I'm thinking latency issue... so I remote connected to my dedicated server/VM and noticed every few minutes the DCS Open Beta server window will go to a 'Not Responding' state for a few minutes then return just to repeat the process a few minutes later. During these moments I checked the task manager and CPU workload is roughly 40% and Memory consumption is close to 40-50% used. The DCS.exe task itself would also go back and forth from running to 'not responding' just like the server window does. So if it isn't DCS workload (running out of resources) then the next thing to try is the Event Viewer. I opened up the event viewer and I saw hundreds of 'info' and 'warning' messages but no actual errors under any of the sections (Application, Security, etc.). If it's not an event then maybe it's in the DCS logs themselves. Quote === Log opened UTC 2021-11-16 20:34:16 2021-11-16 20:34:15.176 INFO APP: Command line: "D:\Program Files\Eagle Dynamics\DCS World OpenBeta Server\bin/DCS.exe" --norender --server 2021-11-16 20:34:15.177 INFO APP: DCS/2.7.7.15038 (x86_64; Windows NT 10.0.17763) 2021-11-16 20:34:15.177 INFO APP: Application revision: 195037 2021-11-16 20:34:15.177 INFO APP: Renderer revision: 22490 2021-11-16 20:34:15.177 INFO APP: Terrain revision: 22438 2021-11-16 20:34:15.177 INFO APP: Build number: 687 2021-11-16 20:34:15.177 INFO APP: CPU cores: 4, threads: 4, System RAM: 16383 MB, Pagefile: 2432 MB 2021-11-16 20:34:15.862 INFO EDCORE: (dDispatcher)enterToState_:0 2021-11-16 20:34:16.200 INFO Dispatcher: 2021/11/16 15:34 V1803061700 2021-11-16 20:34:16.432 INFO NET: ProtocolVersion: 272 2021-11-16 20:34:16.453 INFO SOUND: Using driver: wasapi 2021-11-16 20:34:16.453 INFO SOUND: Found 0 available audio device(s): 2021-11-16 20:34:16.456 INFO Dispatcher: InitLow 2021-11-16 20:34:16.845 INFO EDCORE: Loaded D:/Program Files/Eagle Dynamics/DCS World OpenBeta Server/bin/CockpitBase.dll 2021-11-16 20:34:17.564 INFO NET: Login success. 2021-11-16 20:34:18.829 INFO NET: Got auth data. 2021-11-16 20:34:19.094 INFO APP: Successfully got authorization data. 2021-11-16 20:34:19.102 INFO Dispatcher: Loading installed modules... My first response was "Oh I bet the server is trying to process everything (which would cause massive slowdown because there's no video card on the VM) however judging by the logs above it IS running --norender --server so that isn't an issue either. Running a ping to the server from my flight PC returns a ping of 12ms so I know it isn't that either, and running a speed-test I'm getting 100+ Upload and 350+ Download so it isn't bandwidth. I checked all my open ports using telnet and just basic online port checkers and I'm able to hit the server on 10308, 10309, and 8088 without issues. So at this point I'm really lookin' for help from anyone willing to assist. If it isn't system resources, ping/latency, or an application error I'm completely out of guesses. Thanks ahead of time gang! dcs (1).log Link to comment Share on other sites More sharing options...
PravusJSB Posted November 17, 2021 Share Posted November 17, 2021 it could be a number of things but my goto and most likely is that you have a bad lua function causing it. I lean that way because you say it resolves and repeats. Do you have the mission code to share? I can take a look. Nothing in that log file indicates an issue. Creator & Developer of XSAF ::An AI model that wants to kill you, and needs no help from humans. Discord: PravusJSB#9484 twitch.tv/pravusjsb https://www.patreon.com/XSAF https://discord.gg/pC9EBe8vWU https://bmc.link/johnsbeaslu Work with me on Fiverr: https://www.fiverr.com/pravusjsb Link to comment Share on other sites More sharing options...
Mitissa Posted November 17, 2021 Author Share Posted November 17, 2021 I'll share whatever info I can gather I would just need to know what files. Thanks for the assistance ahead of time Pravus! Link to comment Share on other sites More sharing options...
Mitissa Posted November 17, 2021 Author Share Posted November 17, 2021 The only .lua file I've edited outside of the standard Beta Server install is the MissionScripting.lua below. The instructions for DCS Liberation state this is required to export the state.json file which carries data from one mission to the next. Basically it said to comment out the majority of lines. All the other .lua files have remained unchanged --Initialization script for the Mission lua Environment (SSE) dofile('Scripts/ScriptingSystem.lua') --Sanitize Mission Scripting environment --This makes unavailable some unsecure functions. --Mission downloaded from server to client may contain potentialy harmful lua code that may use these functions. --You can remove the code below and make availble these functions at your own risk. -- local function sanitizeModule(name) -- _G[name] = nil -- package.loaded[name] = nil -- end -- -- do -- sanitizeModule('os') -- sanitizeModule('io') -- sanitizeModule('lfs') -- require = nil -- loadlib = nil -- end Link to comment Share on other sites More sharing options...
Mitissa Posted November 19, 2021 Author Share Posted November 19, 2021 Okay update and closing this but I wanted to post in the event someone else ran into the issue. My brother is the one hosting the VM for me to use so we both remoted in and he monitored resources while I flew so we could get real-time results. The issue is that DCS doesn't use multi-threading yet so the CPU (despite not running at 100% total) is grinding one core into the ground at 100% but none of the other CPU's are doing anything. The issue will self-resolve once ED is able to release Multi-thread support but until then I'm just going to have to run missions locally. Thanks to everyone that read and replied (or messaged me on Discord), but this particular issue is at the mercy of ED's devs. Link to comment Share on other sites More sharing options...
Aries144 Posted November 20, 2021 Share Posted November 20, 2021 (edited) You've just saved my sanity. I thought I was the only one. I've been having a similar issue running liberation missions on a dedicated server instance (the separate install version), except I'm also playing on that server with a DCS client on the same machine, and my server instance is hard crashing and doesn't recover. I'm finding it crashes after 1-1.5 hours. I was running it with .5 economy and .5 starting money to try and cut down on the number of units. It still happened. No error msg, nothing in event viewer, nothing useful in the dcs.log. I've noticed that about 1+ hours in, something is causing many, many aircraft to take off. I counted at least 80 when the game had hung upon server crash. RAM usage was only 40%. So far I think either 1. Liberation is overwhelming the server with AI and too much active AI is causing the crash somehow. or 2. there's a unit doing something bad that's crashing the server, like the old crash caused by RPG troops damaging themselves with their RPG and that instacrashing DCS or the server the unit was on. It does seem like Liberation, or possibly an obscure unit used by Liberation, is the common denominator here. Edited November 20, 2021 by Aries144 Link to comment Share on other sites More sharing options...
Mitissa Posted November 29, 2021 Author Share Posted November 29, 2021 It has a LOT to do with how much is being processed and Liberation adds a lot into .miz file that will cause this. All of the settings have an impact like culling distance, adding infantry beside vehicles on the front-line, etc. There is one thing I've tried so far Aries that might help you specifically because you're running the server on the same machine that you're playing on. We're going to need two windows running in the background to start with. One being Task Manager, the other being Resource Monitor (RM). You can open the RM through the task manager using the link in the lower-left of the 'Performance' tab in the Task Manager. Once you launch your DCS SERVER, alt-tab back to the RM, highlight DCS.exe, and take note of which CPU it is using as well as the PID. This'll be easy to see because DCS only uses one processor at the moment (single-threaded). For this example, my server file is running on CPU 3 looking at the graphs running down the right side and the PID of 3168: Okay, so we made a mental note that it is CPU3. Now let's launch the game itself. Once you're loaded in (at the main menu, not the server you're playing on), alt tab back out and head back to the Task Manager. You'll now see TWO DCS.exe's which is perfectly fine, but may be confusing which is why we made a note of the PID earlier. The one with the PID from earlier we're not going to touch, it's staying on CPU 3. We want to right-click the other one and go to 'Set Affinity'. This essentially lets us tell DCS which processor we want it to use. At this point you can pick any CPU you want that is not 3, so for yucks on mine I told DCS it can use anything but CPU 3. And then that's it! Alt tab back into the DCS.exe that you're actually playing on and now your Server and Game are using two different CPU's and they won't consume each other's resources. Keep in mind this only free's up the CPU assignment, you will still be sharing OTHER resources like RAM. This won't fix your problem but it's likely to buy you more than 90-minutes of flight time you're getting now. As for the Liberation missions themselves, they're likely going to be packed with fillers that bog us down until the Multi-threading is finalized and in open beta. You can however cut down on consuming shared resources by changing some things in the Mission Generator. It'll remove some realism but if it's between 'real' and '5 frames per second' I'll take a hit to my realism. Smoke Generator Spacing - Jack that number up. It doesn't change the quality of smoke but the quantity. Your front line will still look like a warzone but you may only have 6 pillars of smoke instead of 12. Generate Infantry sqauds alongside vehicles - I kept this on since I have 64Gb of RAM in my rig, but that's another massive resource-sink. Disable to save resources for where they're needed. Generate carcasses - Just like the two above, you'll take a hit to realism by removing the dead bodies from previous missions. So the mission you're currently flying will be unaffected and frankly once your front-line moves up you really aren't going to need to see the old bodies anyway. Culling Distance - This is another resource-saver regardless of what rig you're running. Basically Liberation is saying "I'm going to place tanks and buildings all over the map, but I'm not going to generate them or give them life unless you're within' the range below". The distance is the radius from each 'base' in Liberation. This can be a carrier, an air field, a FOB, the front-line... so the smaller the distance the less the CPU has to divert movement commands to. I have seen others suggest un-checking 'Moving ground units' but that completely eliminates the point of Lib maps. If the units don't move, neither does the front-line, so turn after turn is just going to be 'remove what was killed'. Hope this helps a bit Aries and anyone else who's frantically waiting for Multi-thread support to finish! Link to comment Share on other sites More sharing options...
Recommended Posts