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

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106923
interpreted = N
texte = > You guys are all missing the point. The guys wants it. No one missed the point. I suggested a solution that will absolutely work, and it will give PigHead the data he wants. When you eliminate the db accesses as I suggested, you also eliminate the deadlock issue. Simple. > That all being said, that code looks like it could be > done with a two lines of code. If the site is so busy that the heavy traffic is causing the deadlock issue, replacing append with replace may not help. In this case the better solution may be to write to a log file rather than to the dbs. Since writing to a log file will absolutely avoid deadlock issues it is arguably a better approach -- especially if your goal is to solve the problem definitively the first time. > I cannot see how you know if someone has gone > offline or not based on the above code. Agreed. So just write to a log file that is formatted as a db and then it can be included in the PigHead's special admin template. Then search for only the hits recorded during the past 5 minutes or one hour or whatever PigHead's particular opinion is about how long people remain on the site after their last hit. > So if you need that simply add a > timestamp to the db and run a different script, I > recommend from a trigger or cron job, and have it remove > anyone that is idle for more than X minutes. My suggestion above does the same thing more easily while avoiding all db accesses, and it is guaranteed to eliminate the deadlock issue without fail. Look, I don't have any problem using dbs (or using replace instead of append) when dbs are actually necessary. But dbs are absolutely not necessary here, so why not avoid them altogether? Then you KNOW you're going to eliminate the problem! Sincerely, Kenneth Grome 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)
> You guys are all missing the point. The guys wants it. No one missed the point. I suggested a solution that will absolutely work, and it will give PigHead the data he wants. When you eliminate the db accesses as I suggested, you also eliminate the deadlock issue. Simple. > That all being said, that code looks like it could be > done with a two lines of code. If the site is so busy that the heavy traffic is causing the deadlock issue, replacing append with replace may not help. In this case the better solution may be to write to a log file rather than to the dbs. Since writing to a log file will absolutely avoid deadlock issues it is arguably a better approach -- especially if your goal is to solve the problem definitively the first time. > I cannot see how you know if someone has gone > offline or not based on the above code. Agreed. So just write to a log file that is formatted as a db and then it can be included in the PigHead's special admin template. Then search for only the hits recorded during the past 5 minutes or one hour or whatever PigHead's particular opinion is about how long people remain on the site after their last hit. > So if you need that simply add a > timestamp to the db and run a different script, I > recommend from a trigger or cron job, and have it remove > anyone that is idle for more than X minutes. My suggestion above does the same thing more easily while avoiding all db accesses, and it is guaranteed to eliminate the deadlock issue without fail. Look, I don't have any problem using dbs (or using replace instead of append) when dbs are actually necessary. But dbs are absolutely not necessary here, so why not avoid them altogether? Then you KNOW you're going to eliminate the problem! Sincerely, Kenneth Grome Kenneth Grome

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:

A multi-processor savvy WebCatalog? (1997) if then else. BUG? (2003) Sandbox DB permissions (2005) Includeform Error (2002) WebCat for Unix?? (1997) Updating a database once per day - An example (1998) Nested tags count question (1997) RE: extended ASCII with middle command (1999) WebCommerce: Folder organization ? (1997) setcookie getcookie on the same page (2003) b12 cannot limit records returned and more. (1997) Showif, Hideif reverse logic ? (1997) wierd crashes for multi-sendmails on NT (1997) Freeze (2003) User / Pass in TCP connect (2007) Smith Micro - no competition (2000) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) SQLCONNECT (2005) Show first 50 characters (2005) separate by mont (search) (2002)