I think it would be useful for you to narrow the problem down. From what I understand, the client is connected - and remains connected - to the server, but the data stops flowing over the connection despite the fact that the file you're tailing continues to grow.
I suggest writing a quick test script to run File::Tail on the file in exactly the same way as you do in interact():
$filename=...
$file=File::Tail->new(name=>$filename, maxinterval=>5, interval=+>1, t
+ail=>-1, errmode=>\&do_exit);
while ( defined($line=$file->read) )
{
print localtime()." ".$line;
}
I suggest you run this on the server host, in parallel with your existing client/server code. Redirect the output to some file. If the problem recurs, you check to see if this little test script also failed. If so, you know the problem is with tail. If not, it's most likely to be a network issue.
Alternatively of course, you could add some extra logging to your existing server code. You'll probably end up having to do that anyway.
In general I don't think you can collect enough debugging information in a situation like this. Make every part of your code print out something to a log to tell you what it's doing.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.