Re: WebCAT has the devil in it!

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 54065
interpreted = N
texte = We are a bit out of sync on our posts ;) >It appears that when WebCAT went to do a safe write, that it saw a >tempDB >already there and as such created a new one with an incremented number. This is correct. >However, this time, instead of deleting the tmp file after the safe >write it >left it. What is supposed to happen is that the original db file gets renamed to something like "my.db-oRiGiNaL-". If the rename succeeds, then the new temp db file is renamed to the original db name. And if that rename succeeds, the "my.db-oRiGiNaL-" is deleted. I suspect that an 'very' untimely crash occurred during the rename process (which would be pretty rare) and left a dangling "...-oRiGiNaL-" file. This would prevent the first rename step from completing, and would lead to the new incremented tmp file being left in place. IF this happens, delete the '...-oRiGiNaL-' file, backup your original db file, and replace it with the tmp db file with the largest increment. If this happens fairly frequently on your server, the only option that I see would be for you to turn off that Safe Write feature. I would also make sure that error logging is enabled, and check the error logs to track and fix templates bugs. You can also enable the 'Technical Support Information' pref. This will log every hit that comes into the server to a file called WebCatalog.debug. Using this file, you have a good chance of tracking the last template requested before each crash. You can then examine that template code for any errors. That debug log can get pretty big, very fast, so only enable it when you are able to spend some time examining the entries. If resolving template bugs improves engine stability, then you can try re-enabling the SafeWrite pref. Also, it is always a good idea to perform frequent backups of your db files. We will continue to improve the 'Safe Write' code for future releases, as it is a beneficial feature. -----Original Message----- From: Alex McCombie [mailto:alex@newworldmedia.com] Sent: Thursday, November 13, 2003 9:20 AM To: WebDNA Talk Subject: Re: WebCAT has the devil in it! On 11/13/03 11:53 AM, "John Peacock" wrote: > That is exactly the kind of behavior you might see if a spider was hitting > your > site. The fact that it stopped just before you noticed is, IMHO, coincidence. > The fact that the tmp files started showing up at a specific time and stopped > at > a specific time certainly suggests that it was an outside agent... Ok some research and checking and this is what I "believe" happened. I need SMSI to confirm my assumptions on the TMP file issue below to know for sure though. On Tues. noonish, there appears to have been an unscheduled restart. (crash). Apparently WebCAT was in the process of updating the DB with a safe write... Hence the first creation of the tmp file. This disruption in the DB update left an 'orphaned' tmp file in the DIR. Then I have been able to coordinate (roughly) the creation of other TMP db's with traffic for visiting users. Each visit updates the DB. This seems to explain the need for safe write. NOW THE ASSUMPTIONS: It appears that when WebCAT went to do a safe write, that it saw a tempDB already there and as such created a new one with an incremented number. However, this time, instead of deleting the tmp file after the safe write it left it. Then each safe write later, at random times and coordinated with traffic to the area, it created a new incremented tmp file and left it. The last tmp file created was just 9 minutes before I discovered it! I seem to have broken the chain by removing (trashing) all the tmp file in the DIR, thus allowing WebCAT to safe write as expected. If I hadn't removed them I am betting the cycle would have continued. BUT QUESTION TO SMSI Shouldn't the safe write delete the temp file in question if it successfully writes to the db as it does when it doesn't find a tmp file in its way? In other words, it seems a logic flaw is at work here. If DNA finds no tmp file in its way, then it creates one, and safe writes and then deletes it. However, if it find a tmp file 'in its way' it creates an incremented one and succeeds in its safe write, BUT DOES NOT DELETE the incremented version...thus starting on the never ending path to a dead machine. Scott, can you take these questions and assumptions to someone there to confirm or deny them. It appears that I have a real good grip on how and why it occurred, and even how it stopped, but if I am right, then it would seem that the safe write logic of never deleting tmp files is a potential time bomb... And notice I say potential as this is obviously not something that is easily replicated. Basically I am just trying to get a grip on how this happened so that I can devise some strategy for an early warning system in the future. Some my DB's are quite large and the time it would take to have those east the HD would be much much less. Thank Alex Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.com Interface Designer WebDNA Programmer Database Designer ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: WebCAT has the devil in it! ( Alex McCombie 2003)
  2. Re: WebCAT has the devil in it! ( Glenn Busbin 2003)
  3. Re: WebCAT has the devil in it! ( WJ Starck 2003)
  4. Re: WebCAT has the devil in it! ( Brian Fries 2003)
  5. Re: WebCAT has the devil in it! ( Kenneth Grome 2003)
  6. Re: WebCAT has the devil in it! ( "Scott Anderson" 2003)
  7. Re: WebCAT has the devil in it! ( Alex McCombie 2003)
  8. Re: WebCAT has the devil in it! ( "Scott Anderson" 2003)
  9. Re: WebCAT has the devil in it! ( Alex McCombie 2003)
  10. Re: WebCAT has the devil in it! ( "Scott Anderson" 2003)
  11. Re: WebCAT has the devil in it! ( Alex McCombie 2003)
  12. Re: WebCAT has the devil in it! ( John Peacock 2003)
  13. Re: WebCAT has the devil in it! ( Alex McCombie 2003)
  14. Re: WebCAT has the devil in it! ( John Peacock 2003)
  15. WebCAT has the devil in it! ( Alex McCombie 2003)
We are a bit out of sync on our posts ;) >It appears that when WebCAT went to do a safe write, that it saw a >tempDB >already there and as such created a new one with an incremented number. This is correct. >However, this time, instead of deleting the tmp file after the safe >write it >left it. What is supposed to happen is that the original db file gets renamed to something like "my.db-oRiGiNaL-". If the rename succeeds, then the new temp db file is renamed to the original db name. And if that rename succeeds, the "my.db-oRiGiNaL-" is deleted. I suspect that an 'very' untimely crash occurred during the rename process (which would be pretty rare) and left a dangling "...-oRiGiNaL-" file. This would prevent the first rename step from completing, and would lead to the new incremented tmp file being left in place. IF this happens, delete the '...-oRiGiNaL-' file, backup your original db file, and replace it with the tmp db file with the largest increment. If this happens fairly frequently on your server, the only option that I see would be for you to turn off that Safe Write feature. I would also make sure that error logging is enabled, and check the error logs to track and fix templates bugs. You can also enable the 'Technical Support Information' pref. This will log every hit that comes into the server to a file called WebCatalog.debug. Using this file, you have a good chance of tracking the last template requested before each crash. You can then examine that template code for any errors. That debug log can get pretty big, very fast, so only enable it when you are able to spend some time examining the entries. If resolving template bugs improves engine stability, then you can try re-enabling the SafeWrite pref. Also, it is always a good idea to perform frequent backups of your db files. We will continue to improve the 'Safe Write' code for future releases, as it is a beneficial feature. -----Original Message----- From: Alex McCombie [mailto:alex@newworldmedia.com] Sent: Thursday, November 13, 2003 9:20 AM To: WebDNA Talk Subject: Re: WebCAT has the devil in it! On 11/13/03 11:53 AM, "John Peacock" wrote: > That is exactly the kind of behavior you might see if a spider was hitting > your > site. The fact that it stopped just before you noticed is, IMHO, coincidence. > The fact that the tmp files started showing up at a specific time and stopped > at > a specific time certainly suggests that it was an outside agent... Ok some research and checking and this is what I "believe" happened. I need SMSI to confirm my assumptions on the TMP file issue below to know for sure though. On Tues. noonish, there appears to have been an unscheduled restart. (crash). Apparently WebCAT was in the process of updating the DB with a safe write... Hence the first creation of the tmp file. This disruption in the DB update left an 'orphaned' tmp file in the DIR. Then I have been able to coordinate (roughly) the creation of other TMP db's with traffic for visiting users. Each visit updates the DB. This seems to explain the need for safe write. NOW THE ASSUMPTIONS: It appears that when WebCAT went to do a safe write, that it saw a tempDB already there and as such created a new one with an incremented number. However, this time, instead of deleting the tmp file after the safe write it left it. Then each safe write later, at random times and coordinated with traffic to the area, it created a new incremented tmp file and left it. The last tmp file created was just 9 minutes before I discovered it! I seem to have broken the chain by removing (trashing) all the tmp file in the DIR, thus allowing WebCAT to safe write as expected. If I hadn't removed them I am betting the cycle would have continued. BUT QUESTION TO SMSI Shouldn't the safe write delete the temp file in question if it successfully writes to the db as it does when it doesn't find a tmp file in its way? In other words, it seems a logic flaw is at work here. If DNA finds no tmp file in its way, then it creates one, and safe writes and then deletes it. However, if it find a tmp file 'in its way' it creates an incremented one and succeeds in its safe write, BUT DOES NOT DELETE the incremented version...thus starting on the never ending path to a dead machine. Scott, can you take these questions and assumptions to someone there to confirm or deny them. It appears that I have a real good grip on how and why it occurred, and even how it stopped, but if I am right, then it would seem that the safe write logic of never deleting tmp files is a potential time bomb... And notice I say potential as this is obviously not something that is easily replicated. Basically I am just trying to get a grip on how this happened so that I can devise some strategy for an early warning system in the future. Some my DB's are quite large and the time it would take to have those east the HD would be much much less. Thank Alex Alex J McCombie New World Media Chief Information Officer Box 124 888/892.6379 MartVille, NY 13111 Alex@NewWorldMedia.com http://OurClients.com Interface Designer WebDNA Programmer Database Designer ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Scott Anderson"

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:

Setting up the server (1997) Help! WebCat2 bug (Ben's input) (1997) Requiring that certain fields be completed (1997) Multiple Sendmail Tags on One Page (2008) NetForms for mail, sorry (1998) Bug in Mac webcatalog3_0_5b11 (1999) Append is limiting the Number of Characters written to db (fwd) (1998) [tcp connect] (1998) WebCatalog can't find database (1997) Likelihood of a duplicate (Palle you around?) (2005) OT: javascript print() (2003) Re:Problem displaying search result (1997) Summing fields (1997) db access problem after switching to SSL (2001) Calculating UPS Shipping (1999) syntax question, not in online refernce (1997) [OT] Local San Diego SIGs (2003) GETCOOKIE not working as expected (2005) Single Link browsing (1997) WebCat with WebTen (1998)