Re: [WebDNA] An unknown error occured // Deadlock avoided

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106909
interpreted = N
texte = Tommy If you are using any version of webdna less than version 7, then please = note that there is a webdna bug that causes [append] tags to write to = disk, even if the admin pref. has been set to not do that. =20 Normally (unless the admin pref has been set to auto-commit) webdna just = writes any new record to the *RAM copy* of the db.. and your disk copy = does not get updated to match the RAM copy until you do a = [closedatabase] or [commitdatabase]. But because of the bug, before = webdna version 7, [append] writes to the disk copy constantly.. meaning = that appends are much slower than they should be... =20 The workaround for this, which I recommend you implement (in case you do = keep the below 'topbanner.inc' code you posted), is to use a = [replace...] with the '&append=3DT' param (instead of the [append]). In = the [replace...] params, you just search for a record which you *know* = will not exist - to force the append operation... and since [replace..] = does not have the same bug, your operation (essentially an append, same = as before) stays in RAM - nice and fast. Some thing like this: replace this: [append db=3D[path]../../database/counter.db]DB_DATO=3D[date = %Y/%m/%d]&DB_ANTAL=3D1[/append] ...with this: [Replace = db=3D[path]../../database/counter.db&eqDB_DATOdatarq=3DdontFind2ForceAppen= dHaveAniceDay]DB_DATO=3D[date %Y/%m/%d]&DB_ANTAL=3D1[/Replace] ...and do the same kind of thing for the [append] to 'online.db' . I have no idea if implementing this will help your situation.. but it = might relieve some pressure .. and if your issue is a phantom one = (meaning not consistent on every firing of the said problem code (if we = even know where that problem code is)), then just relieving some = pressure could give you months or years of wiggle room to address the = real deeper issue(s). - Govinda -------------- Old WebDNA talklist archives: http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk On 2011-07-11, at 4:03 AM, = wrote: > [snip] > Only two places is the online.db file used. >=20 > One is just a search with nothing else done to it. The other appends = or > replaces in online.db I am guessing this is where the problem is. = Despite > this appearing to be a windows problem, I hope someone will look at = this > and perhaps comment if it is even sane to do something like this. >=20 > topbanner.inc > [search db=3D[path]../../database/online.db&eqDB_IPdatarq=3D[IPAddress]]= > [showIf [numFound]=3D0] > [append > = db=3D[path]../../database/online.db]DB_IP=3D[IPAddress]&DB_DATO=3D[DATE]&D= B_TID=3D[time]&DB_URL=3D[url][ThisURL]?a=3Db[FormVariables][hideIf > = [name]=3Dtemplate]&[name]=3D[value][/hideIf][/FormVariables][/url]&DB_KUND= EID=3D[kunde]&DB_BROWSER=3D[url][browser][/url]&DB_URL_REF=3D[url][REFERRE= R][/url][/append] > [search db=3D[path]../../database/counter.db&eqDB_DATOdata=3D[date= %Y/%m/%d]] > [showIf [numFound]<1] > [append db=3D[path]../../database/counter.db]DB_DATO=3D[da= te > %Y/%m/%d]&DB_ANTAL=3D1[/append] > [/showIf] > [showIf [numFound]>0] >=20 > = [replacefoundItems]DB_ANTAL=3D[math][DB_ANTAL]+1[/math][/replacefoundItems= ] > [/showIf] > [/search] > [/showIf] > [showIf [numFound]=3D1] > [replace > = db=3D[path]../../database/online.db&eqDB_IPdatarq=3D[IPAddress]]DB_DATO=3D= [DATE]&DB_TID=3D[time]&DB_URL=3D[url][ThisURL]?a=3Db[FormVariables][hideIf= > = [name]=3Dtemplate]&[name]=3D[value][/hideIf][/FormVariables][/url]&DB_KUND= EID=3D[kunde][/replace] > [/showIf] > [/search] > [snip] Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] An unknown error occured // Deadlock avoided (Stuart Tremain 2011)
  2. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  3. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  4. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  5. Re: [WebDNA] An unknown error occured // Deadlock avoided (Dan Strong 2011)
  6. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  7. Re: [WebDNA] An unknown error occured // Deadlock avoided (Govinda 2011)
  8. Re: [WebDNA] An unknown error occured // Deadlock avoided (Paul Willis 2011)
  9. Re: [WebDNA] An unknown error occured // Deadlock avoided (Dan Strong 2011)
  10. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  11. Re: [WebDNA] An unknown error occured // Deadlock avoided (Dan Strong 2011)
  12. Re: [WebDNA] An unknown error occured // Deadlock avoided (christophe.billiottet@webdna.us 2011)
  13. Re: [WebDNA] An unknown error occured // Deadlock avoided ( 2011)
  14. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  15. Re: [WebDNA] An unknown error occured // Deadlock avoided (Dan Strong 2011)
  16. Re: [WebDNA] An unknown error occured // Deadlock avoided ( 2011)
  17. Re: [WebDNA] An unknown error occured // Deadlock avoided ( 2011)
  18. Re: [WebDNA] An unknown error occured // Deadlock avoided (Govinda 2011)
  19. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  20. Re: [WebDNA] An unknown error occured // Deadlock avoided (Dan Strong 2011)
  21. Re: [WebDNA] An unknown error occured // Deadlock avoided ( 2011)
  22. Re: [WebDNA] An unknown error occured // Deadlock avoided (Dan Strong 2011)
  23. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  24. Re: [WebDNA] An unknown error occured // Deadlock avoided ( 2011)
  25. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  26. Re: [WebDNA] An unknown error occured // Deadlock avoided (Tommy Bell 2011)
  27. Re: [WebDNA] An unknown error occured // Deadlock avoided (Tommy Bell 2011)
  28. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  29. Re: [WebDNA] An unknown error occured // Deadlock avoided (Stuart Tremain 2011)
  30. Re: [WebDNA] An unknown error occured // Deadlock avoided (christophe.billiottet@webdna.us 2011)
  31. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  32. Re: [WebDNA] An unknown error occured // Deadlock avoided (Stuart Tremain 2011)
  33. RE: [WebDNA] An unknown error occured // Deadlock avoided ("Terry Nair" 2011)
  34. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  35. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  36. Re: [WebDNA] An unknown error occured // Deadlock avoided (christophe.billiottet@webdna.us 2011)
  37. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  38. Re: [WebDNA] An unknown error occured // Deadlock avoided (Ronald Kirkland 2011)
  39. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  40. Re: [WebDNA] An unknown error occured // Deadlock avoided (Tommy Bell 2011)
  41. Re: [WebDNA] An unknown error occured // Deadlock avoided (Kenneth Grome 2011)
  42. Re: [WebDNA] An unknown error occured // Deadlock avoided (christophe.billiottet@webdna.us 2011)
  43. Re: [WebDNA] An unknown error occured // Deadlock avoided (Tommy Bell 2011)
  44. Re: [WebDNA] An unknown error occured // Deadlock avoided (christophe.billiottet@webdna.us 2011)
  45. Re: [WebDNA] An unknown error occured // Deadlock avoided (Tommy Bell 2011)
  46. Re: [WebDNA] An unknown error occured // Deadlock avoided (Govinda 2011)
  47. Re: [WebDNA] An unknown error occured // Deadlock avoided (christophe.billiottet@webdna.us 2011)
  48. [WebDNA] An unknown error occured // Deadlock avoided (Tommy Bell 2011)
Tommy If you are using any version of webdna less than version 7, then please = note that there is a webdna bug that causes [append] tags to write to = disk, even if the admin pref. has been set to not do that. =20 Normally (unless the admin pref has been set to auto-commit) webdna just = writes any new record to the *RAM copy* of the db.. and your disk copy = does not get updated to match the RAM copy until you do a = [closedatabase] or [commitdatabase]. But because of the bug, before = webdna version 7, [append] writes to the disk copy constantly.. meaning = that appends are much slower than they should be... =20 The workaround for this, which I recommend you implement (in case you do = keep the below 'topbanner.inc' code you posted), is to use a = [replace...] with the '&append=3DT' param (instead of the [append]). In = the [replace...] params, you just search for a record which you *know* = will not exist - to force the append operation... and since [replace..] = does not have the same bug, your operation (essentially an append, same = as before) stays in RAM - nice and fast. Some thing like this: replace this: [append db=3D[path]../../database/counter.db]DB_DATO=3D[date = %Y/%m/%d]&DB_ANTAL=3D1[/append] ...with this: [Replace = db=3D[path]../../database/counter.db&eqDB_DATOdatarq=3DdontFind2ForceAppen= dHaveAniceDay]DB_DATO=3D[date %Y/%m/%d]&DB_ANTAL=3D1[/Replace] ...and do the same kind of thing for the [append] to 'online.db' . I have no idea if implementing this will help your situation.. but it = might relieve some pressure .. and if your issue is a phantom one = (meaning not consistent on every firing of the said problem code (if we = even know where that problem code is)), then just relieving some = pressure could give you months or years of wiggle room to address the = real deeper issue(s). - Govinda -------------- Old WebDNA talklist archives: http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk On 2011-07-11, at 4:03 AM, = wrote: > [snip] > Only two places is the online.db file used. >=20 > One is just a search with nothing else done to it. The other appends = or > replaces in online.db I am guessing this is where the problem is. = Despite > this appearing to be a windows problem, I hope someone will look at = this > and perhaps comment if it is even sane to do something like this. >=20 > topbanner.inc > [search db=3D[path]../../database/online.db&eqDB_IPdatarq=3D[ipaddress]]= > [showIf [numFound]=3D0] > [append > = db=3D[path]../../database/online.db]DB_IP=3D[ipaddress]&DB_DATO=3D[date]&D= B_TID=3D[time]&DB_URL=3D[url][thisurl]?a=3Db[formvariables][hideIf > = [name]=3Dtemplate]&[name]=3D[value][/hideIf][/FormVariables][/url]&DB_KUND= EID=3D[kunde]&DB_BROWSER=3D[url][browser][/url]&DB_URL_REF=3D[url][REFERRE= R][/url][/append] > [search db=3D[path]../../database/counter.db&eqDB_DATOdata=3D[date= %Y/%m/%d]] > [showIf [numFound]<1] > [append db=3D[path]../../database/counter.db]DB_DATO=3D[da= te > %Y/%m/%d]&DB_ANTAL=3D1[/append] > [/showIf] > [showIf [numFound]>0] >=20 > = [replacefounditems]DB_ANTAL=3D[math][DB_ANTAL]+1[/math][/replacefoundItems= ] > [/showIf] > [/search] > [/showIf] > [showIf [numFound]=3D1] > [replace > = db=3D[path]../../database/online.db&eqDB_IPdatarq=3D[ipaddress]]DB_DATO=3D= [date]&DB_TID=3D[time]&DB_URL=3D[url][thisurl]?a=3Db[formvariables][hideIf= > = [name]=3Dtemplate]&[name]=3D[value][/hideIf][/FormVariables][/url]&DB_KUND= EID=3D[kunde][/replace] > [/showIf] > [/search] > [snip] Govinda

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:

send mail problem? (1997) WebMerchant %s error using Authorize.Net (2000) Applescript error (1998) Help! WebCat2 bug (1997) How old am I? (2004) [OT] Passing a WebDNA variable through flash (2004) invoice.tpl (1998) A little syntax help (1997) Another question (1997) Sendmail truncation in Eudora Clients (1998) [writefile] remotely (2000) Max Record length restated as maybe bug (1997) OBDC Support (1997) restart needed???? (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) Old Style vs XML Syntax (2003) WebDNA-Talk Digests (1997) Another question (1997) re: emailer prob (1998) log files (1998)