To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.admin.generalOpen lugnet.admin.general in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Administrative / General / 5363
5362  |  5364
Subject: 
Re: Traffic Page Squiff?
Newsgroups: 
lugnet.admin.general
Date: 
Mon, 20 Mar 2000 02:38:59 GMT
Viewed: 
390 times
  
In lugnet.admin.general, Richard Franks writes:
Sometimes (periodically as I use the traffic page a lot), it will stop
loading, incomplete, with a 'Document done'. I kinda suspected that what
was happening was that your script was doing the every 5 min update while
I was loading it..  but it happens so infrequently that I didn't think it
was a big deal, and by the time I had thought about it more, it was too late.
But this time I saved the truncated HTML, and then reloaded a few seconds
later, and saved that too.  Then I forgot about it for 5 days - d'oh!

<http://lightning.prohosting.com/~spontif/temp/traffic.html>
<http://lightning.prohosting.com/~spontif/temp/traffic2.html>

If you want to look up the logs.. then windows has them both timed as March
15 18:14 (GMT).

I diffed the files and they are different - ie the first one isn't just a
truncated version of the second. Which suggests to me that it is your traffic
script not asking for an exclusive lock or something?

Thanks for reporting this.  You're right, it was doing something foolish...
it was generating the new page right over the top of the old page.  Now it
writes the new page out to a temporary file and does an atomic destructive
rename operation to replace the old file with the completed new file.  This
is guaranteed read-safe under Unix even if someone is still reading the old
file when you replace it (it doesn't disappear until the last open filehandle
is closed -- all handled magically and transparently by the filesystem).
I also wrapped this in a semaphore and added some error handling, so it won't
start a second process if for some reason it ever does take more than 5
minutes to run.

BTW, the probability of encountering the bug was approximately 0.116% --
fortuitously high, as bugs go.

--Todd



Message has 1 Reply:
  Re: Traffic Page Squiff?
 
(...) I got it again :) (URL) 18546b (URL) 20451b Although this time when I diffed the files, as far as I could tell they were the same - the first just got truncated.. The time was 19:33 GMT, and the difference in file size is 1905b. I dunno uf (...) (24 years ago, 30-Mar-00, to lugnet.admin.general)

Message is in Reply To:
  Traffic Page Squiff?
 
Sometimes (periodically as I use the traffic page a lot), it will stop loading, incomplete, with a 'Document done'. I kinda suspected that what was happening was that your script was doing the every 5 min update while I was loading it.. but it (...) (24 years ago, 20-Mar-00, to lugnet.admin.general)

4 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR