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 = TommyIf 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. =20Normally (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... =20The 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-talkOn 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:
TommyIf 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. =20Normally (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... =20The 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-talkOn 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)