anatol / pacoloco

Caching proxy server for Arch Linux pacman
MIT License
216 stars 30 forks source link

cold files cause timeouts #58

Closed markg85 closed 11 months ago

markg85 commented 1 year ago

Hi,

First of all, great project! I'm using this on a couple places with the intent of downloading less packages and being faster where a second pc needs the same updates. Win-win to me :)

But.. I've noticed a lot of timeouts to a point where using this, otherwise awesome project, is becoming a pain.

Lets just for simplicity sake describe a connection between 2 pc's (server - running pacoloco - and the client making a connection to that server. The mirrorlist on the client only knows the server, this is intentional.

Now multiply the above by a large number of updates and you all of a sudden spend hours struggling through timeout errors. No joke. I had about 600 package updates and it kept giving me package timeouts. I ended up disabling pacoloco for this update round.

What the server should do in this case, and perhaps in every case, is act as a caching reverse proxy. With the caveat that it should do chunked transfers to keep the client side fed with data.

I did look at some go reverse proxy examples but this combination of factors seems to be tricky. I did find this though that's a full blown solution on it's own. You might find some of it's code interesting for this project.

Focshole commented 1 year ago

Do you have any logs on when does it happen? I cannot reproduce your issue. Maybe there is something else going on that it is causing the issue.

I do usually get long waits with no timeout when the package is not available upstream (when I try a pacman -S without doing pacman -Sy before). Fully agree on how annoying is it.

I didn't open an issue about it so far because the downloading part needs some refactoring/improvement to support some features requested on other issues (see #7 ) and some better handling of some structure it uses (see #44 and #30) .

Once that feature is implemented, a timeout can be implemented there too!

anatol commented 11 months ago

I think this downloaded issue is resolved now.

markg85 commented 11 months ago

Sorry for not responding earlier, I completely forgot about this.

Truth be told, i disabled using pacoloco completely as it was too unstable for me. I might try again as things apparently have changed to fix the issues i had.