I found that the log rotate function was doing a lot more than rotating
the logs and causing squid to effectively shutdown for long periods (30
seconds or more). I also changed the logging so that it doesn't abort
and core if it can't write a log file. Here's the patch to trim the
rotate down to size.
Ken
Index: src/logfile.c
190,194c190,203
< if (s == len)
< return;
< if (!lf->flags.fatal)
< return;
< fatalf("logfileWrite: %s: %s\n", lf->path, xstrerror());
--- > > /* > * Don't abort and core dump because we can't write a log file > * Something else should come along and free up some space on the > * partition. > * > * if (s == len) > * return; > * if (!lf->flags.fatal) > * return; > * fatalf("logfileWrite: %s: %s\n", lf->path, xstrerror()); > */ > > return; Only in /home/kmoberg/downloads/squid/2.5.9/vchange/squid-2.5.STABLE9/src: logfile.c~ Index: src/main.c 54a55 > static void mini_rotate(void); 399a401,408 > mini_rotate(void) > { > _db_rotate_log(); /* Rotate cache.log */ > storeLogRotate(); /* Rotate store.log */ > accessLogRotate(); /* Rotate access.log */ > } > > static void 722c731,732 < mainRotate(); --- > /* mainRotate(); */ > mini_rotate();Received on Tue Oct 25 2005 - 13:34:04 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Nov 01 2005 - 12:00:07 MST