Open rowdyrotifer opened 5 years ago
Did a bit more investigation: it looks like the cli and server versions both have a 1-minute hardcoded timeout from what I can tell:
https://github.com/turbobytes/cdnfinder/blob/ab169f1ba5e08b717483e3fb35aa5b65d5631ba8/cmd/cdnfindercli/main.go#L25 https://github.com/turbobytes/cdnfinder/blob/ab169f1ba5e08b717483e3fb35aa5b65d5631ba8/cmd/cdnfinderserver/main.go#L53
However, it seems like something else is making the server fail more quickly than the 1 minute timeout... haven't pinned this one down yet. I assume it probably has something to do with:
Example: http://www.hainan.gov.cn/
time curl server: real 0m43.729s FAILURE
time curl server: real 0m35.672s FAILURE
time curl server: real 0m40.762s FAILURE
time cdnfindercli: real 0m39.426s SUCCESS
time cdnfindercli: real 0m49.250s SUCCESS
time cdnfindercli: real 0m41.158s SUCCESS
time cdnfindercli: real 1m1.796s FAILURE
I think when using the full site tool on slow, distant websites, the tool gives up and times out when it simply needs a lot of time to load the whole page. Is there a timeout hardcoded in somewhere that could be made configurable?
Example: http://www.hainan.gov.cn/ fails for me with my own server and also on the cdnplanet.com server. With cdnfindercli it results in
signal: killed
, and with the http API it results in an empty replycurl: (52) Empty reply from server