Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.

TwrTrainer- Socket closed by remote host


Carson Murphy
 Share

Recommended Posts

Carson Murphy
Posted
Posted

I'm an S3 Mentor at San Juan CERAP and every time I try to do a sweatbox, I'll load a file with 20-25 airplanes and initially about half of them will load. After about five minutes airplanes will disappear and I'll be left with 5-7 airplanes. I'll get a notice for every plane that disappears saying 'Socket Closed by Remote Host'.

I've seen posts on this forum where other people were having the same issue but it was because they were an S2 using SweatBox and you have to be an S3. SInce I'm an S3, I have no idea what this issue could be resulting from and I haven't found any solutions anywhere I've looked. This just continues my long and hard struggles with TWRTrainer.

Anybody have any idea what the issue is?

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

Back when I first started instructing on VATSIM (about 12 years ago) I had a problem where if I loaded too many aircraft in ACSim, after a few minutes, they would start to disappear, until eventually all were gone. It would only happen when I had a lot of aircraft loaded, such as 20 or more. This made me suspect that having a lot of aircraft loaded was causing too many data packets to be sent and received by my network card.

 

The way ACSim and TWRTrainer work, you have a separate connection to the sweatbox server for each aircraft, plus another connection for your radar client such as VRC. Each aircraft sends data to the server, and that data is sent by the server back to any aircraft in range, which obviously includes all of the aircraft you have loaded. So for every packet of data sent by each aircraft, that data is sent back 20+ times to your network card, one copy for each aircraft, and another copy for your radar client. So adding aircraft increases the packet processing load exponentially.

 

Back then I was using the network card built into the motherboard on my computer. On a whim I decided to try switching to a dedicated PCI network card. That solved the problem immediately. I tested the theory by switching back and forth between then dedicated PCI card and the on-board network card. Every time I tried to use the on-board card, the problem would occur. Every time I used the PCI card, everything worked fine.

 

This made me think that it was a problem with the driver for the on-board network card. I suspected that the incoming data buffers in that driver were not big enough to handle the high rate of packets, and it started dropping packets, causing the targets to time out.

 

This was just a theory that happened to fit the facts ... I just switched to my PCI network card and didn't investigate any further.

 

So maybe you could look at using a different network interface if that's a possibility for you. Are you on wireless by any chance?

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Carson Murphy
Posted
Posted

Thanks for the quick reply Ross! I do happen to be using a laptop for running TWRTrainer and am using a wireless connection if that makes any difference for the network. So it sounds like this is a hardware issue and the only solution would be to buy a network card?

Thanks,

Carson Murphy

Link to comment
Share on other sites

Ross Carlson
Posted
Posted
Thanks for the quick reply Ross! I do happen to be using a laptop for running TWRTrainer and am using a wireless connection if that makes any difference for the network. So it sounds like this is a hardware issue and the only solution would be to buy a network card?

 

Well, I would never say the "only" solution is to buy a network card ... there are simply too many variables in play. And I can't even say that a network card would be a solution at all. I just wanted to relate my experience and see if it might give some clues.

 

The issue could still be something that isn't related to your PC at all. For example, it could be a problem in your router. (That seems less likely to me, but I thought I should point it out as a possibility.)

 

Does your laptop have an ethernet jack that you could try temporarily?

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

Bradley Grafelman
Posted
Posted

Do you need all 20+ aircraft at once? If not, another solution/workaround could be to split them into multiple .air files and loading them in batches (after deleting aircraft already handled).

Link to comment
Share on other sites

  • 3 weeks later...
Carson Murphy
Posted
Posted
Does your laptop have an ethernet jack that you could try temporarily?

 

Sorry for taking a month to reply, I've taken a little bit of a break but I do have an ethernet port. Would that possibly provide a faster connection?

(Note: I have Spectrum as an ISP so I say 'faster' with discretion)

Link to comment
Share on other sites

Ross Carlson
Posted
Posted

It's not the speed of the connection that is important in the scenario I described above. It's the size of the incoming data buffers in the network adapter's driver. Switching to a different connection type might have larger buffers and allow you to avoid the problem. That's what worked for me, years back.

Developer: vPilot, VRC, vSTARS, vERAM, VAT-Spy

Senior Controller, Boston Virtual ARTCC

Link to comment
Share on other sites

 Share