Re: Updating a database once per day - An example
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 17974
interpreted = N
texte = >At 16:18 Uhr -1000 30.05.1998, Kenneth Grome wrote:>>>>Okay, so if my template closes a database on a busy server, then>>>[movefile]s in a newly uploaded copy of the database, it's possible for>>>WebCatalog to reopen this database between the closing and the file>>>transfer if it receives another request for it?>>>>Good question, I will have to leave this one for the guys at PCS ... :)>>I believe if you perform [closedatabase] AFTER you moved the new one in,>there will be no chance to open the old one - it simply does not exist>anymore.I hate to disagree, but this last recommendation is wrong ...You *must* close the database FIRST -- because closing it, or using [flushdatabases], or quitting WebCatalog -- are the only ways to purge the old data from RAM. And you *must* purge the RAM cache or that RAM-cached data will overwrite the newer disk file at the next [closedatabase] or [flushdatabases] or [quit].If you want to make sure this manual updating process works properly without any problems, other than *possibly* a visitor or two getting an Error: the database 'test.db' could not be found or opened message during the process (which should take no more than a second or two at the most), do this in your update template:[DELETEFILE] <--trash the current db file[CLOSEDATABASE] <--purge the RAM cache[MOVEFILE] <--move the new db file into placeThis insures that when it's time to move the new db file into position, the old data is already purged from RAM ... and the old db file could not be reloaded because it wasn't there to be reloaded -- it was already deleted from disk.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
>At 16:18 Uhr -1000 30.05.1998, Kenneth Grome wrote:>>>>Okay, so if my template closes a database on a busy server, then>>>
[movefile]s in a newly uploaded copy of the database, it's possible for>>>WebCatalog to reopen this database between the closing and the file>>>transfer if it receives another request for it?>>>>Good question, I will have to leave this one for the guys at PCS ... :)>>I believe if you perform
[closedatabase] AFTER you moved the new one in,>there will be no chance to open the old one - it simply does not exist>anymore.I hate to disagree, but this last recommendation is wrong ...You *must* close the database FIRST -- because closing it, or using
[flushdatabases], or quitting WebCatalog -- are the only ways to purge the old data from RAM. And you *must* purge the RAM cache or that RAM-cached data will overwrite the newer disk file at the next
[closedatabase] or
[flushdatabases] or [quit].If you want to make sure this manual updating process works properly without any problems, other than *possibly* a visitor or two getting an Error: the database 'test.db' could not be found or opened message during the process (which should take no more than a second or two at the most), do this in your update template:
[deletefile] <--trash the current db file
[closedatabase] <--purge the RAM cache
[movefile] <--move the new db file into placeThis insures that when it's time to move the new db file into position, the old data is already purged from RAM ... and the old db file could not be reloaded because it wasn't there to be reloaded -- it was already deleted from disk.Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
possible bug in unix version? (2000)
WebCat2b13MacPlugin - nested [xxx] contexts (1997)
Problem displaying search result (1997)
pc (1997)
Help name our technology! (1997)
HTTPS Post on Mac server (2001)
WebCat b13 CGI -shownext- (1997)
ODBC Help (2004)
WebCatalog NT beta 18 problem (1997)
Encryption Level (2003)
[WebDNA] MD5 Hash issue (2009)
How fast is your server? (2002)
HideIf ip= OR ip (1998)
How to get shownext to just shownext once (1997)
WebCatalog can't find database (1997)
[OT] Redhat 6.1 (2003)
Missing Cart Information (2003)
Setting up shop (1997)
WC2.0 Memory Requirements (1997)
how to construct a search for not this entire string? (2000)