PC Server host machine randomly loses internet connection

E-102 Gamma

Terrarian
I've recently started hosting a dedicated server on my desktop PC for a small group of players (<10). The server seems to run just fine. People are able to connect to it and play on it largely without issue.

However, while the server is running, my computer will sometimes, suddenly and without warning, lose connection to my router. This happens after seemly random intervals, which in my experience range from about 20 minutes to 12 hours, though more typically around 4 hours (perhaps inversely proportional to the amount of activity on the server). No other piece of software has ever caused this to happen, including my dedicated Minecraft server; and no other computer in my network loses internet connectivity when this happens.

After my computer loses network connection, the server continues to run as though nothing were amiss, though it often gets stuck at "Saving world..." and refuses to close. If I try to launch the Terraria client via Steam while my computer is in this state, it will take a conspicuously long time to start (this is particular to Terraria; Steam will launch other games without a hitch).

Rebooting the router proved unhelpful, as did physically unplugging my ethernet cable and plugging it back in. The only way to correct this that I've found is to restart the computer. Strangely, the computer usually takes a very long time to reboot after this happens (several minutes, as opposed to less than one); it will sometimes outright fail to restart, instead just returning to the lock screen and requiring the password again; and I've even had it BSoD on one occasion. As an experiment, I once tried opening Device Manager and disabling my ethernet controller, which caused Device Manager to hang and refuse to close.

This is apparently a very obscure issue. The only other documentation of it that I could find is this Reddit thread from two years ago:
My system specs:

OS: Windows 10 Home (64-bit), version 22H2, build 10.0.19045
Motherboard: ASUS ROG STRIX B760-F GAMING WIFI, BIOS version 1658
Processor: Intel Core i5-13600K
Memory: G.Skill Ripjaws S5 DDR5-6000 32GBx2
GPU: NVIDIA GeForce RTX 3080

Router: Actiontec MI424WR Rev. I, firmware version 40.20.4.2

The only change I've made in my motherboard BIOS is enabling X.M.P.

The server is running completely vanilla 1.4.4.9, with mostly default settings. I've tried changing its priority from High to Normal, which made no observable difference.

Device Manager had been showing an error with a "PCI Data Acquisition and Signal Processing Controller." It said that its driver was missing. This is apparently associated with network problems, so I had high hopes that solving the error would do away with my connectivity problems. Unfortunately, even after updating my motherboard's BIOS and chipset driver, which solved the error in Device Manager, the problem with the dedicated server and my network connection persisted. DM also complains that drivers are not installed for my external hard drive, but that should have no relevance to this issue.

If I run Intel's MEUpdateTool, a small window pops up and says, "Warning!!! Please check MEI Driver is installed." Device Manager shows an "Intel(R) Management Engine Interface #1" under System Devices, and insists that its driver is up-to-date when I try to install the latest one from ASUS's ROG website.

Windows Update fails to install a "2024-01 Security Update for Windows 10 Version 22H2 for x64-based Systems (KB5034441)", throwing error code 0x80070643; but that's apparently a known and unrelated issue, and one of little concern to me: KB5034441: Windows Recovery Environment update for Windows 10, version 21H2 and 22H2: January 9, 2024 - Microsoft Support

I'm out of ideas. I've run out of things to try, and things to update. Anybody got any ideas on how to fix this, or at least how to diagnose and troubleshoot it better? Any help would be greatly appreciated.

I have also posted to Reddit about this issue:
 
How big is the mass storage in your PC and how full is each partition?
How high are the ressource usages, especially the Network usage?
How many other devices are connected to the same internet network?
 
How big is the mass storage in your PC and how full is each partition?
2 TB SSD. There are no partitions to speak of, and the drive is mostly empty.
How high are the ressource usages, especially the Network usage?
The server barely puts a dent in my resources. The CPU rarely sees more than about 10% utilization, and the server doesn't usually take more than a gig of RAM. Network usage sometimes spikes to ~500 Kbps, but typically hovers around the 50-150 range. I've watched Task Manager and Resource Monitor while the bug happened, and didn't see anything unusual; it just flatlined.
How many other devices are connected to the same internet network?
Fewer than 10. It's a pretty typical home network, with a few computers, smartphones, a printer, and other miscellaneous devices connected to it. This issue doesn't seem to correlate with any network usage in the household.
 
Hey @E-102 Gamma, I'm sorry to hear you're having server issues.

I'll be frank with you, I can't really think of anything Terraria does that could cause this, and I would expect the middleware to intercept anything that could disrupt your connection to the router. However, I wouldn't be doing my job properly if I dismissed Terraria as the culprit out of hand, so I would like to ask some questions to potentially narrow down the issue:
  1. Did this issue start happening from the very beginning, or did it start after a certain point of progression/building?
  2. Does this issue happen with any world, or just a specific one?
  3. Does this issue happen when there's nobody on the server?
  4. Can this issue be traced back to any specific action on the server, such as someone connecting or leaving, but also fighting a boss or an invasion, for example?
 
1. Did this issue start happening from the very beginning, or did it start after a certain point of progression/building?
Seems to have been present from the beginning. It first happened less than four hours after we began, which I think was before we had fought any bosses (certainly nothing more than Eye of Cthulhu).
2. Does this issue happen with any world, or just a specific one?
It didn't happen with the throwaway test world that I ran for about two hours, but that could simply be that it didn't run long enough. It might as well be noted that the test world was a small world, and the proper playthrough world was a large world. Beyond that, there was nothing unusual about either world.
3. Does this issue happen when there's nobody on the server?
4. Can this issue be traced back to any specific action on the server, such as someone connecting or leaving, but also fighting a boss or an invasion, for example?
It seemed to happen specifically when somebody attempts to connect to the server. There was something like a 10% chance that this would cause my computer to lose connection. Certain users also seemed to be more prone to causing this to happen than others, but everyone was able to connect without issue most of the time, at least. That could just be an artifact of low sample size, though.

Anyway, some updates are in order: I think I've narrowed the issue down to my motherboard's ethernet controller, the Intel I226-V, which is a famously problematic piece of hardware. I have tried everything I can think of to get it to stop crashing: Updating the LAN driver, going through its driver settings and disabling everything that says "Offload," tweaking the Speed & Duplex setting and the power saving settings. But the inescapable conclusion that I have arrived at is that it just isn't going to play nice with the Terraria server.

To test this theory, I installed a wireless network card and disabled the onboard ethernet card yesterday. My computer lost connection to wi-fi once, but that seems to have been an unrelated communication issue with the router. I'm looking to install a discreet ethernet card to further test my theory that the I226-V was to blame. Will keep you posted.
 
Alright, I have yet to install a new ethernet card, but it's been a week, so a follow-up is probably still in order.

We have played the whole way through Hardmode and beaten Moon Lord, all while my computer's internet connection has remained rock-steady. The issue definitely had everything to do with my motherboard's onboard ethernet controller.

However, I am unwilling to let Terraria off the hook so easily. Again, I'd like to underscore the fact that the dedicated server was the only piece of software that ever crashed the ethernet card. It was doing something that no other piece of software ever did, and was effectively incompatible with an otherwise functional ethernet controller. It seems to me that a close look at Terraria's netcode is in order.

Here are the reproduction steps for the issue I faced:
  1. Host a Terraria dedicated server on a (Windows 10 Home, 64-bit) PC that is connected to the Internet via an Intel® Ethernet Controller I226-V.
  2. It may be necessary to host a large world, and it may be necessary to have players connect and play on the world for a short while (20+ minutes).
  3. Have Terraria clients repeatedly connect to the server. I only encountered this issue with clients connecting over the Internet. I don't know whether or not clients connecting via LAN can also cause it. Connecting to the server with a client running on the server host machine never caused the issue.
  4. There is a chance that the ethernet controller will crash and the computer will lose connection to the Internet each time a player connects. I would estimate this chance as roughly 10-20%.
Good luck in getting to the bottom of this!🫡
 
I am having this exact issue. Rebooting the pc is the only thing that fixes the ethernet issue, and even then it's only temporary. The pc runs a satisfactory server and has for months on end without issue. Terraria however I can't keep the server up for more than a few hours without the issue. I'm testing the wireless network now to see if that has any issues, ethernet unplugged, but I can find multiple reports of this dating back a while so it's odd, and would be ni e to ha e a fix for. I'm going to try and get some logging to see what exactly is shutting off the ethernet adapter but I don't have high hopes.
 
Also running into the problem with an Intel I225-V. Nothing else makes this problem occur besides hosting the Terraria Server on my desktop. This post and a few on reddit with similar problems all having found no solution other than a networking card which seems an unreasonable solution given that I do not believe the Intel ethernet controller to be solely responsible for this issue. No other network connection has caused it to indefinitely lose function over years of use.
 
Back
Top Bottom