ID:1901603
 
What operating system and/or browser are you using?
Windows 8 Professional, Chrome/Firefox

What were you trying to do when the problem occurred?
Join and play any game

What actually happened, and how did it differ from what you expected?
Refuses to connect to any game, just says Connecting...
Also, if I try and download any dev libraries, I have to restart the download like 20 times before it actually starts to download - otherwise it just drops the connection and says 'install' again.

What steps did you follow?
- Reinstalled BYOND on another partition
- Disabled all anti-virus software
- Disabled all firewalls
- Tried to open the game's web client, which worked successfully (i.e. was able to connect and download the game's resources, which I'm unable to do via the pager)
- Tried running it in Compatibility mode for Windows 7/XP SP 3
- Tried running it in administrator mode
- Contacted my ISP to see whether or not they were filtering BYOND's traffic - they aren't



More Information
- Router is a Dlink DSL-2750U
- Internet speed @ 4mb/s
- Connected with ethernet, not wireless
- This has been going on ever since the 5.0 pager came out - I can barely play any games, and if I do they disconnect me within 20 minutes and I have to restart
- BYOND is not installed on the C:// partition, but rather on F:// (not sure if this could be a problem, but eh, thought I'd mention it)

Being on a non-C partition shouldn't be an issue unless F is a network share; it's been known to have issues over a network share. However, the fact that the connections are so poor for downloads would suggest that this is entirely a network issue. It sounds to me as if that system might be dropping packets left and right, which is kind of surprising given that you said it's not using WiFi.

Based on all your info, I'm entirely certain this is strictly a networking problem, though. So all investigative efforts should be focused in that direction.
@Lummox_JR

Does BYOND's pager run the http port (port 80)? If that's the case I can try and see if some other application (such as Skype) might be interfering with it.

If not, which port is it running on? Might be that something's wrong with the pager port, since the web client worked perfectly.

Here's ping info to the hub.

Pinging hub.byond.com [199.168.119.52] with 32 bytes of data:
Reply from 199.168.119.52: bytes=32 time=275ms TTL=48
Reply from 199.168.119.52: bytes=32 time=281ms TTL=48
Reply from 199.168.119.52: bytes=32 time=282ms TTL=48
Reply from 199.168.119.52: bytes=32 time=292ms TTL=48

Ping statistics for 199.168.119.52:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 275ms, Maximum = 292ms, Average = 282ms
The pager doesn't use inbound port 80 for anything, no.

The fact that you're having trouble connecting to games also, which is done in Dream Seeker and not the pager, says that your problems are across the board, and all network-related.

So if all security software is suspended, is it possible that maybe some malware could be interfering?
I doubt it, I turned my antivirus software and firewalls off to see if it made a difference with connecting to games - it didn't. My PC is scanned for malware once a week.

BYOND's the only software which gives this problem. Everything else I try works perfectly, but that could be attributed to those things having a good server infrastructure (i.e. Guild Wars 2, Dota 2, SWTOR, etc...).

Also, I asked a couple of IRL friends to download the pager and see if they could download games - it does exactly the same thing on their rigs (and they have MUCH better internet/PCs than I do), so I doubt it's something on my end.

Then again, it could be the distance between South Africa and wherever your server is located. Maybe we require a 20mb/s internet connection and 20ms ping to connect to games?

Also, the pager is really buggy. 3/4 of the time I need to clear my cfg files or it just refuses to start up. Sometimes, even then, it won't start up and I have to reinstall it.

Also, sometimes while it says Connecting..., ads randomly start, play, and then the game just stops at "Your game will start shortly". This happens when I click "Join" 5 times.
The old pager worked perfectly. This problem started when the new pager came out, and has become progressively worse since updates have been rolled out :(
I could see how the locale might have something to do with it. Honestly I wouldn't rule out your ISP as the culprit.
Update: I logged out of the pager (i.e. guest), tried to join a game and boom - it started downloading (albeit it goes 31.5kb, 62.5kb, then stops).
See, that's the thing: Why is it stopping? The dropped connection is not the software's fault; it's using regular old TCP/IP that everything else uses. And that's Dream Seeker doing that, not the pager.
Alright, after spamming the pager with about 30 connections to the game I want to download, and logging out, IT DOWNLOADS.

And it's doing it weirdly. It starts out slowly, like:

32.5kb, wait 5 seconds... 65.6kb...wait 5 seconds,
125.1kb
wait 3 seconds
156.4
wait 3 seconds
187.6kb
wait 2 seconds
218.9kb
etc...
It could be that there's some congestion on the transport layer :P

Or it could be that the TTL on the packets is too low (I've run into this problem before). I'm thinking it's a question of congestion/distance playing in as a factor here, but it doesn't explain why it just suddenly started working.

Do you prioritize certain types connections somehow?

Recall that TCP has the Sliding Window protocol built into it, so it starts out sending packets at a slow rate and then increases it after successful acknowledgement. Since the increase of packets sent/received is slow, I can only think of congestion as a problem.

Also this suggests that I'm not getting acknowledgement packets from you guys - at least not at a fast enough rate for packets to be transmitted again from my side - thus, the connection times out. That's why it stops downloading.
Okay, a couple of things:

- When I log in (i.e. as Hishido), an ad plays immediately when I try to join a game
- The pager then instantly says connection failed

- When I start the game as a guest, an ad plays about 3/4 through the download
- The pager then instantly says connection failed

How are ads integrated into the pager?

I'm not going to pretend I know how BYOND's internal systems work, but I'll just go from general experience with these things.

There might be a problem with mutual exclusion between the threads for the sockets of the games' download server and the pager's ad server - this would cause it to interfere with the downloading process for games from your server when an ad spawns, and acknowledgement packets wouldn't be sent back to my side, thus the connection will drop.

Locally, this wouldn't be a big problem (it'd rarely, if ever occur) since you'd be using the same IP space.

Globally, this is a problem. Whatever is happening from the ads' side is interfering with connections on a global level (this is why the majority of people who have this problem aren't Americans, most likely)

I'm wondering if the sockets' threads somehow interfere with each other and cause each other to crash.

Update: I was just able to download and log into the game when no ad spawned during the downloading process.

Update:
Just tested again - when you log into your BYOND username, an ad spawns directly and the connection is dropped. When you log in as a guest, no ad spawns and you can log in just fine.
We don't prioritize connections. The only thing BYOND does special with TCP/IP is that in Dream Seeker and Dream Daemon, we disable Nagle's algorithm for a faster server-client response. We're not altering the TTL at all from the default.

The lack or delay of a return packet would tend to indicate a problem at your ISP's end, especially since you're seeing this happen when you connect to games, not just to the hub.
An ad shouldn't be interfering with the connection at all. Ads are running in a completely different space, in the embedded browser in Dream Seeker. In the event of a JavaScript error or something like that, I would also expect that the game connection would continue unabated.
Why would you disable Nagle's algorithm? You're sacrificing efficiency for performance (which makes no sense in itself, because efficiency usually leads to better performance), which means the reliability of your system is reduced substantially. Also, that performance increase which you get from disabling Nagle's Algorithm only benefits people with extremely fast internet connections - internet connections which can handle transferring large packets between the server effortlessly.

On a global level, you're dealing with people with different internet speeds. Factor in the average ping between locations, and the fact that the internet speed is slower as well, you're dealing with sending 41 byte packets over very large distances, and a lot of those packets can get lost as they travel from server to client. Furthermore, a lot of these 41 byte packets can be sent at the same time before any acknowledgement packet is sent.

That leads to Congestion Collapse, and it's why there's a lot of packet loss and as a result the connection drops for people who aren't in the US.

This is why the ad thing is causing connection drops too, because what's happening now is that the server is already sending me a large amount of 41 byte packets by downloading the game, which in itself already causes congestion - now you're sending streaming packets of the same size (i.e. they're transmitted much faster) for the ads as well, and I don't have enough time to send acknowledgement packets. Thus, congestion collapse and the connection drops.

Of course, this will only be a problem when we're downloading a game and the ads are streaming at the same time. It's not a problem if the game's already downloaded, which is why I can log into the downloaded game now just fine.
41-byte packets? The download process should be using much larger packets than that. When you download a game's resources, the download should be aiming much, much higher per packet. You might be looking at other game packets that aren't related.

But the reason Nagle's algorithm is disabled is simple timing: BYOND games typically use a 100ms tick rate, and Nagle limits responses within 200ms. There was a rather infamous bug report quite a while back that showed how this could cause really weird sync issues, even while playing over the local network. And games with faster tick rates would be all but impossible to play.
TCP Headers consist of 41 bytes - 20 bytes for TCP, 20 bytes for IPv4 and 1 byte for some other info.

So now, you're sending me 41 bytes in a packet to get at most one byte of information which can actually be used.

It's called the "small packet problem" - Nagle's algorithm attempts to overcome that by buffering output packages as long as there is a "sent packet" for which no "acknowledgement packet" has been received (until it has a full packet worth of data to send again), and as a result you don't have to continuously transmit useless amounts of packages to get useful response packets.

So by disabling Nagle's, you're bombarding the clients with large amounts of bytes in order to get a very small byte return - and you're sending -a lot- of them, which means you're causing congestion on the network.

Your timing issue arises because Nagle's purposefully delays transmission, but you can usually overcome that by setting TCP_NODELAY so that you bypass Nagle's delay.

If you can't fix it with that, use UDP. You can't sacrifice efficiency for latency - you're basically making long distance communication next to impossible except for people with godly internet transmission speed :P
TCP_NODELAY is in fact what we're using to turn the buffering on and off. We're not doing anything special beyond that.
Are you just outright disabling Nagle's? It's possible to only disable Nagle's for actual persistent game connections.

If the pager transfers bulk data (like a game) to the client, the application protocols will send a header first. The header is usually small, and if TCP_NODELAY is set on the socket then you'll get congestion collapse, because the packet with the header will then be transmitted immediately and will probably request an ACK packet as well. Thus, the transfer of bulk data will be delayed and unnecessary network traffic exchanged (i.e. congestion).

You can just use the TCP_CORK option on the socket - the header packet will be included with the bulk data and all the data will be transferred automatically in the packets according to size. When you're done transferring the bulk data you can just uncork the socket so that any partial frames which are left can be sent out. This will have the effect of optimizing how data is sent for things which don't need a persistent, real-time connection (i.e. game downloads)

So, use TCP_CORK option when you're sure that you will be sending multiple data sets together with no delays between them (i.e. Your game download and ad streams).

This would greatly improve the performance of the file transfers :P
Page: 1 2