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

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106915
interpreted = N
texte = Govinda, interesting workaround using [replace]. Note the [append] tag = systematically writing to disk it is not a bug, it had been implemented = this way by SmithMicro, probably as a safety measure. If you check = "Only commit databases to disk when instructed" in the WebDNA = administration and you have a crash, data not written to disk WILL be = lost...=20 We just thought in version 7.0 that we could re-enable administrator = control on this point. - chris On Jul 11, 2011, at 11:05, Govinda wrote: > Tommy >=20 > 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 >=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. >=20 > Some thing like this: >=20 > replace this: > [append db=3D[path]../../database/counter.db]DB_DATO=3D[date = %Y/%m/%d]&DB_ANTAL=3D1[/append] >=20 > ...with this: > [Replace = db=3D[path]../../database/counter.db&eqDB_DATOdatarq=3DdontFind2ForceAppen= dHaveAniceDay]DB_DATO=3D[date %Y/%m/%d]&DB_ANTAL=3D1[/Replace] >=20 >=20 > ...and do the same kind of thing for the [append] to 'online.db' . >=20 >=20 > 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). >=20 > - Govinda > -------------- > Old WebDNA talklist archives: > http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk >=20 >=20 > On 2011-07-11, at 4:03 AM, = wrote: >=20 >> [snip] >=20 >> 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] >=20 >> [snip] >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us 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)
Govinda, interesting workaround using [replace]. Note the [append] tag = systematically writing to disk it is not a bug, it had been implemented = this way by SmithMicro, probably as a safety measure. If you check = "Only commit databases to disk when instructed" in the WebDNA = administration and you have a crash, data not written to disk WILL be = lost...=20 We just thought in version 7.0 that we could re-enable administrator = control on this point. - chris On Jul 11, 2011, at 11:05, Govinda wrote: > Tommy >=20 > 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 >=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. >=20 > Some thing like this: >=20 > replace this: > [append db=3D[path]../../database/counter.db]DB_DATO=3D[date = %Y/%m/%d]&DB_ANTAL=3D1[/append] >=20 > ...with this: > [Replace = db=3D[path]../../database/counter.db&eqDB_DATOdatarq=3DdontFind2ForceAppen= dHaveAniceDay]DB_DATO=3D[date %Y/%m/%d]&DB_ANTAL=3D1[/Replace] >=20 >=20 > ...and do the same kind of thing for the [append] to 'online.db' . >=20 >=20 > 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). >=20 > - Govinda > -------------- > Old WebDNA talklist archives: > http://dev.webdna.us/TalkListArchive/index.tpl?db=3Dwebdna-talk >=20 >=20 > On 2011-07-11, at 4:03 AM, = wrote: >=20 >> [snip] >=20 >> 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] >=20 >> [snip] >=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us christophe.billiottet@webdna.us

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:

$purchase WITHOUT creditcar (1997) # fields limited? (1997) Apache won't load after v5 install (more) (2003) [WebDNA] [ArrayGet] [ArraySet] (2014) Problem with webcat install (1998) 2 databases (1998) Upgrade on MacOSX 3.05 to 3.08 (2000) macosx 1 process, linux N processes, macosx chokes under load (2001) No Access warning when caching HTML files (1997) Message Board (again:-) (2000) Configuring E-mail (1997) The & Problem (1998) Nested vs conditional (1997) Setting Cart value (2000) Mac GUI editors (1997) Where's Cart Created ? (1997) multi-paragraph fields (1997) WebCat2b15MacPlugin - [protect] (1997) Math function in Formula.db (1997) problem: search crashes webstar (1997)