Re: [WebDNA] autonumber duplication, time stamp issue & locking up

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105446
interpreted = N
texte = This is a multi-part message in MIME format. --------------060309080200070605040903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Dale, Thanks for your reply. Here is the code from the page that processes the form data. I removed most of the html code. Thanks in advance for taking a look at this for me. Best Regards, Steve [text]allchecks=pass[/text] [text]emailcheck=ok[/text] [showif [action]=create] [math show=f]emailcount=[CountChars][_CEMAIL][/CountChars][/math] [showif [emailcount]<5] [text]emailcheck=There does appear to enough characters to a valid email address[/text] [text]allchecks=viod[/text] [/showif] [text]emailcheck=is missing the "@" symbol[/text] [text]allchecks=void[/text] [math show=f]emailcount=[CountChars][_CEMAIL][/CountChars][/math] [loop start=1&end=[emailcount]] [text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text] [showif [temp]=@] [text]emailcheck=ok[/text] [text]allchecks=pass[/text] [/showif] [/loop] [showif [emailcheck]=ok] [text]emailcheck=is missing the "." (DOT) symbol[/text] [text]allchecks=void[/text] [loop start=1&end=[emailcount]] [text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text] [showif [temp]=.] [text]emailcheck=ok[/text] [text]allchecks=pass[/text] [/showif] [/loop] [/showif] [search db=/approach/data/contest.db&eqCEMAILdata=[_CEMAIL]] [text]thismonth=[getchars start=1&end=2][date][/getchars][/text] [showif [numfound]>0] [founditems] [text]entrymonth=[getchars start=1&end=2][Cdate][/getchars][/text] [showif [thismonth]=[entrymonth]] [text]allchecks=void[/text] Sorry, your entry was not submitted. There is a ONE ENTRY LIMIT per customer per month (June, July & August 2010). Our records indicate you have already submitted an entry for this month on: [cdate]at[ctime]Entry ID#:[cid] [/showif] [/founditems] [/showif] [/search] [showif [allchecks]=pass] [append db=/approach/data/contest.db&autonumber=CID]&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/append] [COMMITDATABASE db=/approach/data/contest.db] [sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Give-A-Way Entry Confirmation&Content-Type=text/html] Dear [_CFNAME]  [_CLNAME], Thank you for registering your chance to win. [showif [thismonth]=06] For more chances to win...You are welcome to enter again once in July 2010 and once August 2010. [/showif] [showif [thismonth]=07] For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010. [/showif] [/sendmail] Your Entry has been successfully submitted. [showif [thismonth]=06] For more chances to win...You are welcome to enter again once in July 2010 and once August 2010. [/showif] [showif [thismonth]=07] For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010. [/showif] [showif [_NEWSLETTER]=YES] [search db=/approach/data/emaillist.db&eqEMAILADDRESSdata=[_CEMAIL]] [showif [numfound]<1] [append db=/approach/data/emaillist.db&autonumber=EID]EMAILADDRESS=[_CEMAIL][/append] [COMMITDATABASE db=/approach/data/emaillist.db] [sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Newsletter Subscription&Content-Type=text/html] Dear [_CFNAME]  [_CLNAME], Thank you for subscribing to our Monthly Email Newsletter. [/sendmail] [/showif] [/search] [/showif] [/showif] [/showif] [showif [emailcheck]!ok] The email address you entered: [_CEMAIL] [emailcheck] and is NOT Valid. [/showif] [showif [allchecks]=pass] Registration Confirmation Details: [/showif] Dale Therio wrote: > Hi Steve, > > Steve Raslevich wrote: >> Hi all, >> >> First, I am rather a newbie to WebDNA so please bear with me. Up >> until today, I have been mostly using WebDNA for inter office admin >> stuff, sending out our monthly email newsletter (which from an >> earlier post I did resolve the sending duplicate email issue) but >> mostly for slowly creating a new website for my business. Nothing >> really demanding until today when we sent out 23K+ emails announcing >> a "register-to-win" contest and placed a link on our ancient html >> site to a WebDNA form page running on our Linux server. >> >> Within the first 3 1/2 hours after sending out the email, the form >> processed just short of 500 entries. > > 500 entries in 3.5 hours is not many at all. That is only about 2 per > minute. > > >> >> #1) In this short time, the [autonumber] function created at least >> (2) identical, yet uniquely autonumbered records for (2) different >> customer submits. Both duplicate entries show a unique autonumber 1 >> apart from each other and show a time stamp of exactly the same time >> down to the second. The user clicking the submit button more than >> once should not be the issue here. I have the contest limited to one >> entrant per email address per month. When the form is submitted, it >> first searches the contest.db file for an existing record generated >> this month that contains the same email address being submitted. >> WebDNA should have found the first record and not written the second >> record due to the email address match but it did so twice. The time >> between the two occurrences is roughly 3 hours. >> > I would (and do) use cart instead of autonumber. > >> #2) There are multiple instances in the contest database where >> records are logged out of time sequence compared to the autonumber. >> Example: >> record autonumbered 1138 has a time stamp (field) of 18:50:10 >> the following record autonumbered 1139 has a time stamp of 18:49:55, >> a few seconds earlier. >> Shouldn't the greater autonumber be written at a time after the >> lesser autonumber records time? When using [time], isn't WebDNA >> getting the time from the server that is also determining and writing >> the [autonumber]? > It may be based on where in your code the autonumber is vs. how the > time stamp is recorded. If the autonumber is in the page then the time > stamp is written when the record is created these would be out of > sequence. I wouldn't worry about it unless you need to have them in > sync for some reason. > > >> #3) I have been going in regularly and searching the contest.db to >> see how many entries have been created. On occasion, the entire >> website seems to be locking up. No page will load. Not even the >> WebCatalog page. I don't get a time out error, it just sits there >> with the hour glass spinning and saying it's waiting for.... I had my >> local certified Linux specialist log in to our server and he claims >> the box is coasting both in processor use and RAM. He also checked >> the Apache logs and found no issues. Of course it wasn't locked up >> while he was logged in and I had him on the phone. I don't see it >> being our bandwidth as our connection to the internet is 25M up/down >> fiber and the form only has about 20 fields. It goes from lightning >> fast to a total lockup which seems to last for 60 seconds or more at >> a time. Should I be flushing the cache after every write from the >> contest form or something like that? > > Check the code. Post the code. >> >> >> Anyone have any ideas or suggestions? >> >> Thanks, >> Steve > > Dale > --------------060309080200070605040903 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Dale,

Thanks for your reply. Here is the code from the page that processes the form data. I removed most of the html code. Thanks in advance for taking a look at this for me.

Best Regards,
Steve


[text]allchecks=pass[/text]
[text]emailcheck=ok[/text]

[showif [action]=create]
<!-- count number of characters in email address submitted -->
[math show=f]emailcount=[CountChars][_CEMAIL][/CountChars][/math]
<!-- check that email field is more than 4 characters -->
[showif [emailcount]<5]
[text]emailcheck=There does appear to enough characters to a valid email address[/text]
[text]allchecks=viod[/text]
[/showif]

<!-- check email address for @ symbol-->
[text]emailcheck=is missing the "@" symbol[/text]
[text]allchecks=void[/text]
[math show=f]emailcount=[CountChars][_CEMAIL][/CountChars][/math]
[loop start=1&end=[emailcount]]
[text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text]
[showif [temp]=@]
[text]emailcheck=ok[/text]
[text]allchecks=pass[/text]
[/showif]
[/loop]

<!-- check for . in email address-->
[showif [emailcheck]=ok]
[text]emailcheck=is missing the "." (DOT) symbol[/text]
[text]allchecks=void[/text]
[loop start=1&end=[emailcount]]
[text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text]
[showif [temp]=.]
[text]emailcheck=ok[/text]
[text]allchecks=pass[/text]
[/showif]
[/loop]
[/showif]

<!-- check for email address in previous entries-->
[search db=/approach/data/contest.db&eqCEMAILdata=[_CEMAIL]]
[text]thismonth=[getchars start=1&end=2][date][/getchars][/text]
[showif [numfound]>0]
[founditems]
[text]entrymonth=[getchars start=1&end=2][Cdate][/getchars][/text]
[showif [thismonth]=[entrymonth]]
[text]allchecks=void[/text]
Sorry, your entry was not submitted.
There is a ONE ENTRY LIMIT per customer per month (June, July & August 2010).
Our records indicate you have already submitted an entry for this month on:
[cdate]at[ctime]Entry ID#:[cid]
[/showif]
[/founditems]
[/showif]
[/search]

[showif [allchecks]=pass]
[append db=/approach/data/contest.db&autonumber=CID]&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/append]
[COMMITDATABASE db=/approach/data/contest.db]
[sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Give-A-Way Entry Confirmation&Content-Type=text/html]
<html>
<body>
Dear&nbsp;[_CFNAME]&nbsp;&nbsp;[_CLNAME],
Thank you for registering your chance to win.
[showif [thismonth]=06]
For more chances to win...You are welcome to enter again once in July 2010 and once August 2010.
[/showif]
[showif [thismonth]=07]
For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010.
[/showif]
</body>
</html>
[/sendmail]

Your Entry has been successfully submitted.</font>
[showif [thismonth]=06]
For more chances to win...You are welcome to enter again once in July 2010 and once August 2010.
[/showif]
[showif [thismonth]=07]
For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010.
[/showif]

<!-- Subscribe to Email Newsletter check -->
[showif [_NEWSLETTER]=YES]
[search db=/approach/data/emaillist.db&eqEMAILADDRESSdata=[_CEMAIL]]
[showif [numfound]<1]
[append db=/approach/data/emaillist.db&autonumber=EID]EMAILADDRESS=[_CEMAIL][/append]
[COMMITDATABASE db=/approach/data/emaillist.db]
[sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Newsletter Subscription&Content-Type=text/html]
<html>
<body>
Dear&nbsp;[_CFNAME]&nbsp;&nbsp;[_CLNAME],
Thank you for subscribing to our Monthly Email Newsletter.
</body>
</html>
[/sendmail]
[/showif]
[/search]
[/showif]

[/showif]

[/showif]

[showif [emailcheck]!ok]
The email address you entered:
[_CEMAIL]
[emailcheck] and is NOT Valid.
<input type="button" value="Go back & Fix" onClick="window.back()">
[/showif]

[showif [allchecks]=pass]
Registration Confirmation Details:
<!-- display submitted fields -->
[/showif]







Dale Therio wrote:
Hi Steve,

Steve Raslevich wrote:
Hi all,

First, I am rather a newbie to WebDNA so please bear with me. Up until today, I have been mostly using WebDNA for inter office admin stuff, sending out our monthly email newsletter (which from an earlier post I did resolve the sending duplicate email issue) but mostly for slowly creating a new website for my business. Nothing really demanding until today when we sent out 23K+ emails announcing a "register-to-win" contest and placed a link on our ancient html site to a WebDNA form page running on our Linux server.

Within the first 3 1/2 hours after sending out the email, the form processed just short of 500 entries.

500 entries in 3.5 hours is not many at all. That is only about 2 per minute.



#1) In this short time, the [autonumber] function created at least (2) identical, yet uniquely autonumbered records for (2) different customer submits.
Both duplicate entries show a unique autonumber 1 apart from each other and show a time stamp of exactly the same time down to the second. The user clicking the submit button more than once should not be the issue here. I have the contest limited to one entrant per email address per month. When the form is submitted, it first searches the contest.db file for an existing record generated this month that contains the same email address being submitted. WebDNA should have found the first record and not written the second record due to the email address match but it did so twice. The time between the two occurrences is roughly 3 hours.

I would (and do) use cart instead of autonumber.

#2) There are multiple instances in the contest database where records are logged out of time sequence compared to the autonumber.
Example:
record autonumbered 1138 has a time stamp (field) of 18:50:10
the following record autonumbered  1139 has a time stamp of 18:49:55, a few seconds earlier.
Shouldn't the greater autonumber be written at a time after the lesser autonumber records time?  When using [time], isn't WebDNA getting the time from the server that is also determining and writing the [autonumber]?
It may be based on where in your code the autonumber is vs. how the time stamp is recorded. If the autonumber is in the page then the time stamp is written when the record is created these would be out of sequence. I wouldn't worry about it unless you need to have them in sync for some reason.


#3) I have been going in regularly and searching the contest.db to see how many entries have been created. On occasion, the entire website seems to be locking up. No page will load. Not even the WebCatalog page. I don't get a time out error, it just sits there with the hour glass spinning and saying it's waiting for.... I had my local certified Linux specialist log in to our server and he claims the box is coasting both in processor use and RAM. He also checked the Apache logs and found no issues. Of course it wasn't locked up while he was logged in and I had him on the phone. I don't see it being our bandwidth as our connection to the internet is 25M up/down fiber and the form only has about 20 fields. It goes from lightning fast to a total lockup which seems to last for 60 seconds or more at a time. Should I be flushing the cache after every write from the contest form or something like that?

Check the code. Post the code.


Anyone have any ideas or suggestions?

Thanks,
Steve

Dale


--------------060309080200070605040903-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Tom Duke 2010)
  2. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Steve Raslevich 2010)
  3. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Steve Raslevich 2010)
  4. Re: [WebDNA] autonumber duplication, time stamp issue & ("Terry Wilson" 2010)
  5. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Govinda 2010)
  6. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Steve Raslevich 2010)
  7. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Steve Raslevich 2010)
  8. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Dale Therio 2010)
  9. Re: [WebDNA] autonumber duplication, time stamp issue & locking up (Govinda 2010)
  10. [WebDNA] autonumber duplication, time stamp issue & locking up (Steve Raslevich 2010)
This is a multi-part message in MIME format. --------------060309080200070605040903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Dale, Thanks for your reply. Here is the code from the page that processes the form data. I removed most of the html code. Thanks in advance for taking a look at this for me. Best Regards, Steve [text]allchecks=pass[/text] [text]emailcheck=ok[/text] [showif [action]=create] [math show=f]emailcount=[countchars][_CEMAIL][/CountChars][/math] [showif [emailcount]<5] [text]emailcheck=There does appear to enough characters to a valid email address[/text] [text]allchecks=viod[/text] [/showif] [text]emailcheck=is missing the "@" symbol[/text] [text]allchecks=void[/text] [math show=f]emailcount=[countchars][_CEMAIL][/CountChars][/math] [loop start=1&end=[emailcount]] [text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text] [showif [temp]=@] [text]emailcheck=ok[/text] [text]allchecks=pass[/text] [/showif] [/loop] [showif [emailcheck]=ok] [text]emailcheck=is missing the "." (DOT) symbol[/text] [text]allchecks=void[/text] [loop start=1&end=[emailcount]] [text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text] [showif [temp]=.] [text]emailcheck=ok[/text] [text]allchecks=pass[/text] [/showif] [/loop] [/showif] [search db=/approach/data/contest.db&eqCEMAILdata=[_CEMAIL]] [text]thismonth=[getchars start=1&end=2][date][/getchars][/text] [showif [numfound]>0] [founditems] [text]entrymonth=[getchars start=1&end=2][Cdate][/getchars][/text] [showif [thismonth]=[entrymonth]] [text]allchecks=void[/text] Sorry, your entry was not submitted. There is a ONE ENTRY LIMIT per customer per month (June, July & August 2010). Our records indicate you have already submitted an entry for this month on: [cdate]at[ctime]Entry ID#:[cid] [/showif] [/founditems] [/showif] [/search] [showif [allchecks]=pass] [append db=/approach/data/contest.db&autonumber=CID]&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/append] [COMMITDATABASE db=/approach/data/contest.db] [sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Give-A-Way Entry Confirmation&Content-Type=text/html] Dear [_CFNAME]  [_CLNAME], Thank you for registering your chance to win. [showif [thismonth]=06] For more chances to win...You are welcome to enter again once in July 2010 and once August 2010. [/showif] [showif [thismonth]=07] For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010. [/showif] [/sendmail] Your Entry has been successfully submitted. [showif [thismonth]=06] For more chances to win...You are welcome to enter again once in July 2010 and once August 2010. [/showif] [showif [thismonth]=07] For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010. [/showif] [showif [_NEWSLETTER]=YES] [search db=/approach/data/emaillist.db&eqEMAILADDRESSdata=[_CEMAIL]] [showif [numfound]<1] [append db=/approach/data/emaillist.db&autonumber=EID]EMAILADDRESS=[_CEMAIL][/append] [COMMITDATABASE db=/approach/data/emaillist.db] [sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Newsletter Subscription&Content-Type=text/html] Dear [_CFNAME]  [_CLNAME], Thank you for subscribing to our Monthly Email Newsletter. [/sendmail] [/showif] [/search] [/showif] [/showif] [/showif] [showif [emailcheck]!ok] The email address you entered: [_CEMAIL] [emailcheck] and is NOT Valid. [/showif] [showif [allchecks]=pass] Registration Confirmation Details: [/showif] Dale Therio wrote: > Hi Steve, > > Steve Raslevich wrote: >> Hi all, >> >> First, I am rather a newbie to WebDNA so please bear with me. Up >> until today, I have been mostly using WebDNA for inter office admin >> stuff, sending out our monthly email newsletter (which from an >> earlier post I did resolve the sending duplicate email issue) but >> mostly for slowly creating a new website for my business. Nothing >> really demanding until today when we sent out 23K+ emails announcing >> a "register-to-win" contest and placed a link on our ancient html >> site to a WebDNA form page running on our Linux server. >> >> Within the first 3 1/2 hours after sending out the email, the form >> processed just short of 500 entries. > > 500 entries in 3.5 hours is not many at all. That is only about 2 per > minute. > > >> >> #1) In this short time, the [autonumber] function created at least >> (2) identical, yet uniquely autonumbered records for (2) different >> customer submits. Both duplicate entries show a unique autonumber 1 >> apart from each other and show a time stamp of exactly the same time >> down to the second. The user clicking the submit button more than >> once should not be the issue here. I have the contest limited to one >> entrant per email address per month. When the form is submitted, it >> first searches the contest.db file for an existing record generated >> this month that contains the same email address being submitted. >> WebDNA should have found the first record and not written the second >> record due to the email address match but it did so twice. The time >> between the two occurrences is roughly 3 hours. >> > I would (and do) use cart instead of autonumber. > >> #2) There are multiple instances in the contest database where >> records are logged out of time sequence compared to the autonumber. >> Example: >> record autonumbered 1138 has a time stamp (field) of 18:50:10 >> the following record autonumbered 1139 has a time stamp of 18:49:55, >> a few seconds earlier. >> Shouldn't the greater autonumber be written at a time after the >> lesser autonumber records time? When using [time], isn't WebDNA >> getting the time from the server that is also determining and writing >> the [autonumber]? > It may be based on where in your code the autonumber is vs. how the > time stamp is recorded. If the autonumber is in the page then the time > stamp is written when the record is created these would be out of > sequence. I wouldn't worry about it unless you need to have them in > sync for some reason. > > >> #3) I have been going in regularly and searching the contest.db to >> see how many entries have been created. On occasion, the entire >> website seems to be locking up. No page will load. Not even the >> WebCatalog page. I don't get a time out error, it just sits there >> with the hour glass spinning and saying it's waiting for.... I had my >> local certified Linux specialist log in to our server and he claims >> the box is coasting both in processor use and RAM. He also checked >> the Apache logs and found no issues. Of course it wasn't locked up >> while he was logged in and I had him on the phone. I don't see it >> being our bandwidth as our connection to the internet is 25M up/down >> fiber and the form only has about 20 fields. It goes from lightning >> fast to a total lockup which seems to last for 60 seconds or more at >> a time. Should I be flushing the cache after every write from the >> contest form or something like that? > > Check the code. Post the code. >> >> >> Anyone have any ideas or suggestions? >> >> Thanks, >> Steve > > Dale > --------------060309080200070605040903 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Dale,

Thanks for your reply. Here is the code from the page that processes the form data. I removed most of the html code. Thanks in advance for taking a look at this for me.

Best Regards,
Steve


[text]allchecks=pass[/text]
[text]emailcheck=ok[/text]

[showif [action]=create]
<!-- count number of characters in email address submitted -->
[math show=f]emailcount=[countchars][_CEMAIL][/CountChars][/math]
<!-- check that email field is more than 4 characters -->
[showif [emailcount]<5]
[text]emailcheck=There does appear to enough characters to a valid email address[/text]
[text]allchecks=viod[/text]
[/showif]

<!-- check email address for @ symbol-->
[text]emailcheck=is missing the "@" symbol[/text]
[text]allchecks=void[/text]
[math show=f]emailcount=[countchars][_CEMAIL][/CountChars][/math]
[loop start=1&end=[emailcount]]
[text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text]
[showif [temp]=@]
[text]emailcheck=ok[/text]
[text]allchecks=pass[/text]
[/showif]
[/loop]

<!-- check for . in email address-->
[showif [emailcheck]=ok]
[text]emailcheck=is missing the "." (DOT) symbol[/text]
[text]allchecks=void[/text]
[loop start=1&end=[emailcount]]
[text]temp=[getchars start=[index]&end=[index]+1][_CEMAIL][/GetChars][/text]
[showif [temp]=.]
[text]emailcheck=ok[/text]
[text]allchecks=pass[/text]
[/showif]
[/loop]
[/showif]

<!-- check for email address in previous entries-->
[search db=/approach/data/contest.db&eqCEMAILdata=[_CEMAIL]]
[text]thismonth=[getchars start=1&end=2][date][/getchars][/text]
[showif [numfound]>0]
[founditems]
[text]entrymonth=[getchars start=1&end=2][Cdate][/getchars][/text]
[showif [thismonth]=[entrymonth]]
[text]allchecks=void[/text]
Sorry, your entry was not submitted.
There is a ONE ENTRY LIMIT per customer per month (June, July & August 2010).
Our records indicate you have already submitted an entry for this month on:
[cdate]at[ctime]Entry ID#:[cid]
[/showif]
[/founditems]
[/showif]
[/search]

[showif [allchecks]=pass]
[append db=/approach/data/contest.db&autonumber=CID]&[formvariables name=_&exact=F][getchars start=2][name][/getchars]=[url][value][/url]&[/formvariables][/append]
[COMMITDATABASE db=/approach/data/contest.db]
[sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Give-A-Way Entry Confirmation&Content-Type=text/html]
<html>
<body>
Dear&nbsp;[_CFNAME]&nbsp;&nbsp;[_CLNAME],
Thank you for registering your chance to win.
[showif [thismonth]=06]
For more chances to win...You are welcome to enter again once in July 2010 and once August 2010.
[/showif]
[showif [thismonth]=07]
For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010.
[/showif]
</body>
</html>
[/sendmail]

Your Entry has been successfully submitted.</font>
[showif [thismonth]=06]
For more chances to win...You are welcome to enter again once in July 2010 and once August 2010.
[/showif]
[showif [thismonth]=07]
For another chance to win...You are welcome to enter again once between August 1st and August 23rd, 2010.
[/showif]

<!-- Subscribe to Email Newsletter check -->
[showif [_NEWSLETTER]=YES]
[search db=/approach/data/emaillist.db&eqEMAILADDRESSdata=[_CEMAIL]]
[showif [numfound]<1]
[append db=/approach/data/emaillist.db&autonumber=EID]EMAILADDRESS=[_CEMAIL][/append]
[COMMITDATABASE db=/approach/data/emaillist.db]
[sendmail to=[_CEMAIL]&from=support@ourdomain.com&Subject=Newsletter Subscription&Content-Type=text/html]
<html>
<body>
Dear&nbsp;[_CFNAME]&nbsp;&nbsp;[_CLNAME],
Thank you for subscribing to our Monthly Email Newsletter.
</body>
</html>
[/sendmail]
[/showif]
[/search]
[/showif]

[/showif]

[/showif]

[showif [emailcheck]!ok]
The email address you entered:
[_CEMAIL]
[emailcheck] and is NOT Valid.
<input type="button" value="Go back & Fix" onClick="window.back()">
[/showif]

[showif [allchecks]=pass]
Registration Confirmation Details:
<!-- display submitted fields -->
[/showif]







Dale Therio wrote:
Hi Steve,

Steve Raslevich wrote:
Hi all,

First, I am rather a newbie to WebDNA so please bear with me. Up until today, I have been mostly using WebDNA for inter office admin stuff, sending out our monthly email newsletter (which from an earlier post I did resolve the sending duplicate email issue) but mostly for slowly creating a new website for my business. Nothing really demanding until today when we sent out 23K+ emails announcing a "register-to-win" contest and placed a link on our ancient html site to a WebDNA form page running on our Linux server.

Within the first 3 1/2 hours after sending out the email, the form processed just short of 500 entries.

500 entries in 3.5 hours is not many at all. That is only about 2 per minute.



#1) In this short time, the [autonumber] function created at least (2) identical, yet uniquely autonumbered records for (2) different customer submits.
Both duplicate entries show a unique autonumber 1 apart from each other and show a time stamp of exactly the same time down to the second. The user clicking the submit button more than once should not be the issue here. I have the contest limited to one entrant per email address per month. When the form is submitted, it first searches the contest.db file for an existing record generated this month that contains the same email address being submitted. WebDNA should have found the first record and not written the second record due to the email address match but it did so twice. The time between the two occurrences is roughly 3 hours.

I would (and do) use cart instead of autonumber.

#2) There are multiple instances in the contest database where records are logged out of time sequence compared to the autonumber.
Example:
record autonumbered 1138 has a time stamp (field) of 18:50:10
the following record autonumbered  1139 has a time stamp of 18:49:55, a few seconds earlier.
Shouldn't the greater autonumber be written at a time after the lesser autonumber records time?  When using [time], isn't WebDNA getting the time from the server that is also determining and writing the [autonumber]?
It may be based on where in your code the autonumber is vs. how the time stamp is recorded. If the autonumber is in the page then the time stamp is written when the record is created these would be out of sequence. I wouldn't worry about it unless you need to have them in sync for some reason.


#3) I have been going in regularly and searching the contest.db to see how many entries have been created. On occasion, the entire website seems to be locking up. No page will load. Not even the WebCatalog page. I don't get a time out error, it just sits there with the hour glass spinning and saying it's waiting for.... I had my local certified Linux specialist log in to our server and he claims the box is coasting both in processor use and RAM. He also checked the Apache logs and found no issues. Of course it wasn't locked up while he was logged in and I had him on the phone. I don't see it being our bandwidth as our connection to the internet is 25M up/down fiber and the form only has about 20 fields. It goes from lightning fast to a total lockup which seems to last for 60 seconds or more at a time. Should I be flushing the cache after every write from the contest form or something like that?

Check the code. Post the code.


Anyone have any ideas or suggestions?

Thanks,
Steve

Dale


--------------060309080200070605040903-- Steve Raslevich

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:

WebCatalog 4.0 has been released! (2000) The beginning (1997) find with exceptions (1997) Location of Browser Info.txt file (1997) Plugin or CGI or both (1997) Webcat does auto checksum in [setheader]? (1999) Email check problems (1999) A Global Variable (1997) View order not right (1997) Huge databases and RAM (1998) Emailer setup (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) One more time (1997) won't [sendmail] inside of a [search] (2007) Installing Web DNA 5.1 on a MAC (2004) Credit Card Checking?? (1998) WebCatalog Use Question (1997) Include a big block of text (1997) Search returns all, not 20 (1997) [LOOKUP] (1997)