{"record":{"id":"121439fea0eb7fa0","repo":"XX-net/XX-Net","slug":"timeout-checker-found-transfer-no-d-timeout-f","errorCode":null,"errorMessage":"timeout_checker found transfer_no:%d timeout:%f","messagePattern":"timeout_checker found transfer_no:(.+?) timeout:(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"code/default/x_tunnel/local/proxy_session.py","lineNumber":174,"sourceCode":"                    continue\n\n                self.round_trip_thread[i] = threading.Thread(target=self.normal_round_trip_worker, args=(i,),\n                                                             name=\"roundtrip_%d\" % i)\n                self.round_trip_thread[i].start()\n\n            self.connection_pipe.start()\n            xlog.info(\"session started.\")\n            return True\n\n    def timeout_checker(self):\n        while self.running:\n            timeout_num = 0\n            with self.lock:\n                time_now = time.time()\n                for sn, data_info in self.transfer_list.items():\n                    if data_info[\"stat\"] != \"timeout\" and time_now - (data_info[\"start_time\"] + data_info[\"server_timeout\"]) > g.config.send_timeout_retry:\n                        data_info[\"stat\"] = \"timeout\"\n                        xlog.warn(\"timeout_checker found transfer_no:%d timeout:%f\", sn, time_now - data_info[\"start_time\"])\n                        timeout_num += 1\n\n            if timeout_num:\n                self.target_on_roads = \\\n                    min(g.config.concurent_thread_num - g.config.min_on_road, self.target_on_roads + timeout_num)\n                self.trigger_more()\n\n            time.sleep(1)\n\n    def traffic_speed_calculation(self):\n        now = time.time()\n        time_go = now - self.last_traffic_reset_time\n        if time_go > 0.5:\n            self.upload_speed = (self.traffic_upload - self.last_traffic_upload) / time_go\n            self.download_speed = (self.traffic_download - self.last_traffic_download) / time_go\n\n            self.last_traffic_reset_time = now\n            self.last_traffic_upload = self.traffic_upload","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/x_tunnel/local/proxy_session.py#L156-L192","documentation":"The background timeout_checker thread scans transfer_list and marks a round-trip transfer as 'timeout' when the elapsed time since start_time exceeds the transfer's server_timeout plus g.config.send_timeout_retry. The warn reports how long the transfer has been in flight; afterwards target_on_roads is increased and trigger_more() is called to pump more transfers.","triggerScenarios":"Normal operation under packet loss, a stalled connection, or an overloaded/slow x-tunnel server so that a round trip is not acknowledged within server_timeout + send_timeout_retry seconds.","commonSituations":"Lossy or high-latency networks (mobile, cross-continent relays); server temporarily overloaded; send_timeout_retry configured too low for the actual RTT; transient Internet route flaps.","solutions":["Increase g.config.send_timeout_retry (and/or send_timeout) to comfortably exceed your worst-case round-trip time.","Check network quality (packet loss, RTT) to the relay/server and switch to a closer front IP.","If widespread and persistent, check server status; the transfers will be retried automatically.","Reduce offered load (concurent_thread_num) if you are saturating an uplink."],"exampleFix":"# before\nsend_timeout_retry = 2\n\n# after\nsend_timeout_retry = 8","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set send_timeout_retry well above measured worst-case RTT.","Monitor transfer_list timeout rates as a network-quality signal.","Prefer closer/lower-loss relay front IPs."],"tags":["timeout","network","reliability","tunnel"],"backgroundTag":"request-timeout","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}