-
Notifications
You must be signed in to change notification settings - Fork 357
when downloading file the Internet cut down, we could not download this file again when Internet come back #65
Comments
do not use cache in polipo! For your case make sure to use HTTP CONNECT method and the last browser version. If you still fail, in Google Chrome press F12, select and activate Network tab and take a look at server's headers. If it doesn't support resuming - no client-side software will help you |
@netsafe I'm afraid there is some misunderstood.
could any one give some suggestion about how to implement such abnormal optimize it |
@qianguozheng Am I got you right, that you want help with pt.3 in your list? You want to fix this abnormal behaviour? |
@netsafe You got it. Actually I want to author know that polipo may not take such abnormal case into consideration, we need to implement an mechanism to make it work right |
it's not a polipo issue : you need to set proper tcp timeouts+maxconns+openfiles in all the config files and sysctl's, also do not forget to add 80,8080,443 and 8443 to long-living ports in Tor config - it will save your day. After tweaking all sysctl's in system-wide sysctl.conf make sure to perform a full reboot. Feel free to ask if you have any further questions! |
@netsafe WHY it is not polipo's issue ? shouldn't it check whether the response is a finished or not ? |
It can't - under Linux at least - if the session timeout is TOO LONG. Setting explicit timeouts in app code is a very rare condition, unless you're in a great need in ESPECIALLY THIS kind of socket-tuning. It must be tuned on the host itself, host-wide, because it affects not just one program( polipo for example ) but the whole pack of processes running on the box. And to tweak such a parameters is an ABSOLUTELY snadart & basic SA every-day task |
I've actually had the same issue; while downloading large files, if the Internet connection becomes slow and/or unusable and the download is stopped it will fail to download the rest of the file properly on the second try (after connectivity is improved). It seems like Polipo downloads part of the file to its cache, and then on the second request from the client the partial file is served (but not the rest of it). The client just hangs, waiting around for Polipo to serve up the rest of the content. |
@brodyhoskins Have you tried to disable the cache in Polipo config and in HTTP request headers(the requests made to download the file)? |
No I haven't disabled the cache, because I'm using Polipo to do caching. |
@brodyhoskins try to disable cache in polipo and use a caching server like Squid, NGinx or Apache if the polipo caching is the problem here. Theese servers won't eat much resources, but their caching mechanisms are a way higher than polipo's one, IMHO |
I’ll look into those, especially if they compile on (jailbroken) iOS. But I’be grown found of Polipo. ^^
|
The main advantage of polipo caching, in theory at least, is it can cache IMHO if polipo's caching doesn't work correctly, then there's not much I would argue that this is indeed a bug in polipo. If a fetch failed
On 4 September 2015 at 23:03, Alexey Vesnin [email protected]
Donovan Baarda [email protected] |
@brodyhoskins Apache and NGinx are compiling, I did it a long time ago. Can't tell the same about the Squid, but I see no problems |
@dbaarda the main feature of polipo is a VERY good and handy HTTP/HTTPS-CONNECT -> SOCKS connectivity. It helps alot |
True... it is a pretty good HTTP/HTTPS -> SOCKS proxy, and also HTTP 1.0 -> But I don't use it for that, and in theory it should also be a very good On 5 September 2015 at 20:27, Alexey Vesnin [email protected]
Donovan Baarda [email protected] |
This looks like a bug in Polipo, no argument about that. |
@jech , yeah, I think it it a bug in Polipo. |
Polipo already detects interrupted downloads, by either using the |
I have polipo run on OpenWrt router , when I cut down the Internet connection on Route wan port while downloading big file via polipo, the file would never be downloaded unless I delete cache on local.
I have add some debug message to see what happen and review the code again and again, I just found polipo have the httpTimeout check on that case, and only for server will got timeout, the client's connect is right, @jech do you have any suggestion on that ?
what i am thinking is when the server timeout we do shutdown the client fd and destroy the object, but currently I couldn't find the client's fd when server fd timeout.
The text was updated successfully, but these errors were encountered: