Re: WebCatalog Eating 200% of the CPU

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 44863
interpreted = N
texte = What do you mean by 'clean'? A template may contain valid WebDNA syntax, but could still take a long time to process. I would consider such a template 'not' a very good candidate for a generally accessible WebDNA template.Your argument assumes that you (or a hacker) have knowledge of a particular template (or were able to create a template) on the server that can tie up the engine enough to overwhelm it by sending several http requests for that template. If no such template existed, then there is not a risk. Again, this boils down to how carefully and efficiently you have programmed your templates.If it is necessary to create a WebDNA template that will take a large amount of time to complete (often some admin process), then you should put the necessary WebDNA code in place to synchronize access to that template to ensure that only one instance of that template will run at any given time. Templates that you serve to the general public should be 'lean and mean' and not 'over loaded' with to much code.> why have the preference? A high performance server can handle a larger number of http requests, so that preference allows a WebDNA admin to adjust the thread limit accordingly.> -----Original Message----- > From: WebCatalog Talk > [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf > Of Alain Russell > Sent: Monday, November 04, 2002 7:38 PM > To: WebCatalog Talk > Subject: Re: WebCatalog Eating 200% of the CPU > > > Scott, > > I disagree here a bit - If I can bring down another persons > server that is > running code that is 'clean' then surely that sets us all up for DOS > attacks? > > If the engine running in multithreaded mode starts so many > threads that it > goes into a zombie state and does not respond to any requests > why have the > preference? > > Were not talking about bringing the engine to a crawl - when > I simulate this > the engine stops responding totally. The machine it is running on gets > unresponsive and a lot of the time the only way to fix it is > hard reset. > > Alain > > > > > This is not necessarily a bug with the engine. If you > intentionally (or > > accidentally) create a template that performs 10s of > thousands of searches, > > or that contains a huge number of iterations on a block of > WebDNA code, to > > the point where it takes several minutes for the template > to complete; then > > if that template is requested dozens of times within a few > seconds, it would > > be easy to bring the engine to a crawl. This is why it is > important for the > > WebDNA programmer (or any programmer) to exercise some > caution with their > > code. It is always a good idea lookout for possible > infinite or very large > > loops, redundant code, assumptions in form data, etc... > > > > It would be easy to write a C++ application that > intentionally brings an OS > > to its knees, so would that be the fault of the OS? > > > > However, there are a couple of preferences that may help to > prevent a WebDNA > > overload. The 'Max Search Results' was intended to prevent > an accidental > > iteration of a large number of search results in the > [founditems] loop. We > > have also added a new pref that allows you to control the > maximum number of > > concurrent threads the WebDNA engine can spawn. Both of > those may help. > > But again, there is no substitute for thorough testing of > WebDNA template > > code before going to production. > > > > > > > >> -----Original Message----- > >> From: WebCatalog Talk > >> [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf > >> Of Alain Russell > >> Sent: Monday, November 04, 2002 6:00 PM > >> To: WebCatalog Talk > >> Subject: Re: WebCatalog Eating 200% of the CPU > >> > >> > >> No I think it is supposed to catch the 'Zombie' state - > >> perhaps a little > >> more work is needed ?? Perhaps this is why the 4.5 patch > >> seems to have been > >> delayed ;) > >> > >>> On 11/4/02 4:37 PM, Alain Russell > >> wrote: > >>> > >>>> Aaron & I had a discussion about this the other day. > >>>> I've reported to SMSI a while ago about WebDNA doing this > >> with 'good' > >>>> searches when the pages are loaded .. > >>>> > >>>> Say you have a slow/big search that is coded right - hit > >> is a few times > >>>> quickly and this condition can happen. > >>>> > >>>> Check the archives for the discussion. > >>> > >>> Any response from Smith Micro? I thought WebCatalog > >> Monitor was supposed to > >>> catch these situations, or is that only when WebCatalog quits? > >>> > >>> Thanks > >> > >> > >> ------------------------------------------------------------- > >> This message is sent to you because you are subscribed to > >> the mailing list . > >> To unsubscribe, E-mail to: > >> To switch to the DIGEST mode, E-mail to > >> > >> Web Archive of this list is at: http://search.smithmicro.com/ > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://search.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: WebCatalog Eating 200% of the CPU (Dale LaFountain 2002)
  2. Re: WebCatalog Eating 200% of the CPU (Aaron Lynch 2002)
  3. Re: WebCatalog Eating 200% of the CPU (Scott Anderson 2002)
  4. Re: WebCatalog Eating 200% of the CPU (Donovan Brooke 2002)
  5. Re: WebCatalog Eating 200% of the CPU (Donovan Brooke 2002)
  6. Re: WebCatalog Eating 200% of the CPU (Dale LaFountain 2002)
  7. Re: WebCatalog Eating 200% of the CPU (Alain Russell 2002)
  8. Re: WebCatalog Eating 200% of the CPU (Scott Anderson 2002)
  9. Re: WebCatalog Eating 200% of the CPU (Jesse Williams-Proudman 2002)
  10. Re: WebCatalog Eating 200% of the CPU (Scott Anderson 2002)
  11. Re: WebCatalog Eating 200% of the CPU (Alain Russell 2002)
  12. Re: WebCatalog Eating 200% of the CPU (Jesse Williams-Proudman 2002)
  13. Re: WebCatalog Eating 200% of the CPU (Alain Russell 2002)
  14. WebCatalog Eating 200% of the CPU (Jesse Williams-Proudman 2002)
What do you mean by 'clean'? A template may contain valid WebDNA syntax, but could still take a long time to process. I would consider such a template 'not' a very good candidate for a generally accessible WebDNA template.Your argument assumes that you (or a hacker) have knowledge of a particular template (or were able to create a template) on the server that can tie up the engine enough to overwhelm it by sending several http requests for that template. If no such template existed, then there is not a risk. Again, this boils down to how carefully and efficiently you have programmed your templates.If it is necessary to create a WebDNA template that will take a large amount of time to complete (often some admin process), then you should put the necessary WebDNA code in place to synchronize access to that template to ensure that only one instance of that template will run at any given time. Templates that you serve to the general public should be 'lean and mean' and not 'over loaded' with to much code.> why have the preference? A high performance server can handle a larger number of http requests, so that preference allows a WebDNA admin to adjust the thread limit accordingly.> -----Original Message----- > From: WebCatalog Talk > [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf > Of Alain Russell > Sent: Monday, November 04, 2002 7:38 PM > To: WebCatalog Talk > Subject: Re: WebCatalog Eating 200% of the CPU > > > Scott, > > I disagree here a bit - If I can bring down another persons > server that is > running code that is 'clean' then surely that sets us all up for DOS > attacks? > > If the engine running in multithreaded mode starts so many > threads that it > goes into a zombie state and does not respond to any requests > why have the > preference? > > Were not talking about bringing the engine to a crawl - when > I simulate this > the engine stops responding totally. The machine it is running on gets > unresponsive and a lot of the time the only way to fix it is > hard reset. > > Alain > > > > > This is not necessarily a bug with the engine. If you > intentionally (or > > accidentally) create a template that performs 10s of > thousands of searches, > > or that contains a huge number of iterations on a block of > WebDNA code, to > > the point where it takes several minutes for the template > to complete; then > > if that template is requested dozens of times within a few > seconds, it would > > be easy to bring the engine to a crawl. This is why it is > important for the > > WebDNA programmer (or any programmer) to exercise some > caution with their > > code. It is always a good idea lookout for possible > infinite or very large > > loops, redundant code, assumptions in form data, etc... > > > > It would be easy to write a C++ application that > intentionally brings an OS > > to its knees, so would that be the fault of the OS? > > > > However, there are a couple of preferences that may help to > prevent a WebDNA > > overload. The 'Max Search Results' was intended to prevent > an accidental > > iteration of a large number of search results in the > [founditems] loop. We > > have also added a new pref that allows you to control the > maximum number of > > concurrent threads the WebDNA engine can spawn. Both of > those may help. > > But again, there is no substitute for thorough testing of > WebDNA template > > code before going to production. > > > > > > > >> -----Original Message----- > >> From: WebCatalog Talk > >> [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf > >> Of Alain Russell > >> Sent: Monday, November 04, 2002 6:00 PM > >> To: WebCatalog Talk > >> Subject: Re: WebCatalog Eating 200% of the CPU > >> > >> > >> No I think it is supposed to catch the 'Zombie' state - > >> perhaps a little > >> more work is needed ?? Perhaps this is why the 4.5 patch > >> seems to have been > >> delayed ;) > >> > >>> On 11/4/02 4:37 PM, Alain Russell > >> wrote: > >>> > >>>> Aaron & I had a discussion about this the other day. > >>>> I've reported to SMSI a while ago about WebDNA doing this > >> with 'good' > >>>> searches when the pages are loaded .. > >>>> > >>>> Say you have a slow/big search that is coded right - hit > >> is a few times > >>>> quickly and this condition can happen. > >>>> > >>>> Check the archives for the discussion. > >>> > >>> Any response from Smith Micro? I thought WebCatalog > >> Monitor was supposed to > >>> catch these situations, or is that only when WebCatalog quits? > >>> > >>> Thanks > >> > >> > >> ------------------------------------------------------------- > >> This message is sent to you because you are subscribed to > >> the mailing list . > >> To unsubscribe, E-mail to: > >> To switch to the DIGEST mode, E-mail to > >> > >> Web Archive of this list is at: http://search.smithmicro.com/ > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://search.smithmicro.com/ > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Scott Anderson

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:

Date Calulation (1997) Formating Tables w/[founditems] (1998) OFF TOPIC: Sendmail problem (2003) [/application] error? (1997) Webcatalog acgi conflict? (1999) WebCat2: multiple currency support (1997) WebMerchant 1.6 and SHTML (1997) WC2.0 Memory Requirements (1997) show me your store ! (2003) WebCat2b15MacPlugin - showing [math] (1997) Showif date range comparison (1999) webcat error log (1998) Emailer and encryption (1997) WebCat2: Items xx to xx shown, etc. (1997) Summing fields (1997) Stopping bad HTML propagation ? (1997) full text search ? (2002) Review comparison by PC Magazine: Open for On-line Business (1997) Non-WebDNA Sites Reporting Errors When WebDNA Isn't Running (2006) [WebDNA] agree? --> [url] broken inside [redirect], on a (2009)