in reply to Weird IO::Socket problem
I suggest writing a quick test script to run File::Tail on the file in exactly the same way as you do in interact():
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.$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; }
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Weird IO::Socket problem
by hallikpapa (Scribe) on Jan 14, 2008 at 20:12 UTC | |
by thparkth (Beadle) on Jan 15, 2008 at 00:01 UTC | |
by quester (Vicar) on Jan 15, 2008 at 05:44 UTC | |
|
Re^2: Weird IO::Socket problem
by hallikpapa (Scribe) on Jan 14, 2008 at 19:23 UTC |