#include <hallo.h>

After a heated private discussion, the main cause of the problem seems
to be a shortcoming in the metadata update concept. But like with all
big trouble there is no single cause but multiple issues appearing
harmless in the beginning.

First, unlike with non-volatile files, apt-cacher-ng prefers to make an
online connection to check whether a volatile (i.e. metadata/index
file) was recently modified on the server. An extra connection is
avoided if a second client connected to proxy and requests the same file
while it's being downloaded from the remote machine and transfered to
another user (i.e. the new client hits a "hot" cache file descriptor).
In other cases a new connection to the mirror is opened, however if
there were no updates then only a response header and maybe one byte of
data. So the waste ammount wasted data itself is negligible (IMHO) but
it still creates some load and spams the logs of the mirror machine.

Now, in a scenario when a user configures dozens of local systems
to run "apt-get update" almost at the same moment (almost=not perfectly)
and doing this regularly (like every twenty minutes) then the time span
between the different requests is long enough to complete the previous
request of this file, and therefore close the cache file descriptor
before the next client requests appears (after a couple of seconds),
leading to the situation described above.

The suggested workaround is adding an artificial timer, extending the
lifetime of the temporary state descriptors for volatile files. Doing
this, the same file should not be downloaded from the server more often
then once in a certain time period. Empirically chosen value is
seventeen seconds but that is subject to change.

Patched packages (0.5.8* -> Sid, 0.5.1* -> Squeeze) can be found at
http://apt-cacher-ng.alioth.debian.org/unreleased/ -- I cannot discover
unexpected side effects yet but a little bit more testing should be done
before suggesting it for Squeeze inclusion.

Feedback would be much appreciated.

Regards,
Eduard.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to