in reply to Man, File::Tail is just beating me down!

First of all, File::Tail is on CPAN - there is no need to post it all here.

Having said that, I think you are running into some kind of a timing problem. File::Tail tries to be clever about detecting when a file has been rotated, and it seems that, under very heavy loads, it sometimes gets a false positive (it thinks that the file has been rotated when it really has not).

I've never been able to generate a reliable test case that would trigger that bug so I could debug it.

My advice is:

Hope this helps

  • Comment on Re: Man, File::Tail is just beating me down!

Replies are listed 'Best First'.
Re^2: Man, File::Tail is just beating me down!
by hallikpapa (Scribe) on Jan 21, 2008 at 04:32 UTC
    Excellent suggestions. If I use the reset_tail function and I am keeping track of the line number(s) that are being read, is there a way I can make it jump straight to a specific line in case of a restart?
      Not currently, no.
        As a follow up, since I made adjustments and increased those two values (30,60) the restarts have stopped to once a day. Oddly enough, they always happen at the 3rd minute. When I say that, it's 12:03, 09:33, 15:23, etc..Probably just a coincidence, there is no cron job, or anything like that. But I will continue to monitor.
Re^2: Man, File::Tail is just beating me down!
by Anonymous Monk on Jul 19, 2010 at 19:15 UTC
    I'm running into the same issue, something causing resets. I have set reset_tail to 0, but the file pointer is still reset to the beginning of the file, which has very bad effects in my application. I'll try setting maxinterval and adjustafter to see if it helps. I'd be happy to help debug this. I think I can reproduce the bug about once/day.