ygrek / mldonkey

cross-platform multi-network p2p daemon (previously at http://mldonkey.sourceforge.net/)
Other
240 stars 45 forks source link

Various log floods #16

Open HinTak opened 8 years ago

HinTak commented 8 years ago

I already has one change which silences a good deal of floods:

--- a/src/utils/net/ip.ml
+++ b/src/utils/net/ip.ml
@@ -360,7 +360,7 @@ let _ =
 (*        lprintf "Ip found for %s: %s\n" job.name (to_string ip);  *)
               job.handler ip
             end else begin
-              lprintf_nl (_b "[DNS] could not resolve %s, check URL") job.name;
+              (* lprintf_nl (_b "[DNS] could not resolve %s, check URL") job.name; *)
               job.err_handler ();
               raise Not_found
             end

(I am sure that's wrong - the correct solution is to not look up some hosts repeatedly, rather than simply silencing failures)

After about 90 minutes, it is collecting a few:

$ cut -f 3-6 -d ' ' mlnet.log  | sort | uniq -d -c
...
    475 [BT] udpt interact with
...
    294 [HTTPcl] 404: Not found
     98 [HTTPcl] 409: bad reply

I see most of them are probably outdated/invalid trackers... nonetheless, it might be a good idea to back off on unresponsive trackers, rather than repeatedly looking them up?

HinTak commented 8 years ago

Even with that, the log seems to be increasing at about 20MB per day, mostly from BT.