KnuckleCracker / CW4-bug-tracker

The gathering point for bugs and supporting information, or suggestions about additional features.
Creative Commons Attribution Share Alike 4.0 International
13 stars 2 forks source link

[Bug] Collonies map download always aborts after 60 seconds #1040

Closed joostbekkers closed 2 years ago

joostbekkers commented 2 years ago

When a map download is slow, the download is always aborted by the client after 60 seconds. Even when the download is progressing.

The player log shows:

FAILED TO RETRIEVE THUMBNAIL
FAILED TO RETRIEVE MAP

Restart/reboot does not fix the issue.

The issue occurs during a POST to http://knucklecracker.com/creeperworld4/queryMaps.php

Solutions that come to mind:

Karsten75 commented 2 years ago

https://github.com/KnuckleCracker/CW4-bug-tracker/discussions/1036

Report back with your findings

joostbekkers commented 2 years ago

@1: yes knucklecracker.com is alive @2: does not resolve the issue. @3

traceroute to knucklecracker.com (72.14.178.233), 64 hops max, 40 byte packets
 1  24.132.239.1  13.084 ms  15.940 ms  13.079 ms
 2  212.142.4.181  10.976 ms  14.131 ms  13.839 ms
 3  213.51.7.86  19.085 ms  19.084 ms  12.934 ms
 4  213.51.64.58  16.986 ms  14.891 ms  16.090 ms
 5  213.46.182.38  16.984 ms  18.032 ms  16.995 ms
 6  213.200.115.26  150.048 ms  142.938 ms  143.064 ms
 7  208.116.213.242  135.968 ms  131.083 ms *
 8  * * *
 9  72.14.178.233  132.431 ms  136.270 ms  137.773 ms

@4: roughly 80Mb/s downstream and 30 upstream. @5: I can download any map I want using curl.

The problem is that 60 seconds after the map download has started, a TCP-RST is sent by the client. All data transferred before that time has been properly acknowledged. So the only reason for that RST is the client aborting the download.

Packet capture of a failed download: cw4-issue-1040.zip

Karsten75 commented 2 years ago

Regrettably, I an unable to examine the supplied .PCAP file.

Edit: A thought occurred to me. I am assuming you are on Steam and are running the most recent version of the game? There was an update that also included a more robust version of the HTTP/S package manager. See #996.

I can tell you, however, that a download of a CW4 file (Here is a sample of file sizes for maps) Should NOT take >60 seconds. Not with the 80 Mbps you you provide above. I suggest that the software is working as intended to prevent indefinite hangs when it perceives it cannot successfully download a map.

Here is a representative list of CW4 file sizes:

(somehow GitHub is not playing along with allowing me to upload a screenshot, I can't recall what case that, but my estimation is that most maps are <500 KB in size. and the thumbnail rarely exceeding 200MB.

Please also note that in the 18 months since CW4 release, you are the first to log this as an issue. So I would suggest that you look to your own infrastructure for the cause of your issue.

joostbekkers commented 2 years ago

Correct assumption on the steam part.

I totally agree downloading a map shouldn't take that long. There appears to be congestion and/or packetloss between me and linode. I've checked the wan of my router and the packets are already missing there. So it's not something I can fix.

I understand the need to prevent waiting forever and a timeout is the most obvious solution. Receiving data is a sign things are still working, one could choose to start the timeout again when data is arriving. I've got a feeling the chances of that being implemented are not great.

I suspect I'm only seeing this with large maps; the one I'm testing with is 1.3MB. For this one and other maps that fail to download I'll manually download them and put them in the maps directory.

That appears to work.

knucracker commented 2 years ago

The https package I use has a default maximum request time of 60 seconds. After that, it aborts the http(s) request it would seem. I've changed the default to be 120 seconds and also added a "NetworkTimeout" setting to the GameSettings.xml so it can be changed if necessary. Will show up in the 2.4 release stream.

joostbekkers commented 2 years ago

Thank you