Re: [WebDNA] Some code inside a large loops fail ... but why?

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 104448
interpreted = N
texte = > >> What about the [tcpconnect] outside the loop, and the [tcpsend] > >> inside? > > > > I tried that too but I got no response at all using that approach. > > I guess it is because the loop quickly opens an increasing number of TCP requests which is limited by the receiving server to something like 10. When this number is reached, the receiving server just reacts as under a DoS attack with a number of opened sockets (SYN_RECV) that the receiving server will just time out after several minutes. This makes sense only when the tcpconnect is outside the loop and the tcpsend is inside the loop. But when both are inside the loop, only one tcp request can be done at a time -- and after each is done the replace context is supposed to write to the db. But when I specified 10000 iterations in the loop, the replace was NOT writing to the db. And this is the part I cannot understand. Why did webdna fail to write to the db after each sequential tcp request? That's where my question about possible bugs comes from. > > I really don't understand why webdna failed to write to the db when I set the number of iterations to 10,000 and I cannot explain why the network activity continued (which means data was being received) but the database writing failed. This is the the mystery that bothers me more than anything else because it suggests a bigger underlying problem that may be unusually difficult to diagnose. > > No mistery here, this is just far away from the normal spectrum of internet use. Imagine that browsers limits simultaneous connections to 4 maxi, just to do not overload http servers. Here, you want to run an asp file 10,000 times opening 10,000 connections as fast as possible, it is normal that it just breaks. I bet a php program would quickly reach the same limit. I think your understand is wrong, and if not then mine is wrong. When I run a loop the way I did, I expect that only one iteration is performed at a time -- and only after one succeeds will the next one be performed. You're suggesting something very different: You're suggesting that all 10,000 iterations are going to be done simultaneously. I cannot understand how this can be possible. My understanding has always been that loops perform their tasks sequentially. If this is true it would be impossible for the second tcp request to begin before the first one ends, or the third to begin before the second one ends, etc. So ... is there something wrong with my understanding or yours? Sincerely, Kenneth Grome www.KenGrome.com Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  2. Re: [WebDNA] Some code inside a large loops fail ... but why? (christophe.billiottet@webdna.us 2010)
  3. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  4. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  5. Re: [WebDNA] Some code inside a large loops fail ... but why? (christophe.billiottet@webdna.us 2010)
  6. Re: [WebDNA] Some code inside a large loops fail ... but why? (Christer Olsson 2010)
  7. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  8. Re: [WebDNA] Some code inside a large loops fail ... but why? (christophe.billiottet@webdna.us 2010)
  9. Re: [WebDNA] Some code inside a large loops fail ... but why? ("Psi Prime Inc, Matthew A Perosi " 2010)
  10. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  11. Re: [WebDNA] Some code inside a large loops fail ... but why? (Brian Fries 2010)
  12. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  13. Re: [WebDNA] Some code inside a large loops fail ... but why? (Govinda 2010)
  14. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  15. Re: [WebDNA] Some code inside a large loops fail ... but why? (Stuart Tremain 2010)
  16. Re: [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  17. Re: [WebDNA] Some code inside a large loops fail ... but why? (Stuart Tremain 2010)
  18. [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
  19. [WebDNA] Some code inside a large loops fail ... but why? (Kenneth Grome 2010)
> >> What about the [tcpconnect] outside the loop, and the [tcpsend] > >> inside? > > > > I tried that too but I got no response at all using that approach. > > I guess it is because the loop quickly opens an increasing number of TCP requests which is limited by the receiving server to something like 10. When this number is reached, the receiving server just reacts as under a DoS attack with a number of opened sockets (SYN_RECV) that the receiving server will just time out after several minutes. This makes sense only when the tcpconnect is outside the loop and the tcpsend is inside the loop. But when both are inside the loop, only one tcp request can be done at a time -- and after each is done the replace context is supposed to write to the db. But when I specified 10000 iterations in the loop, the replace was NOT writing to the db. And this is the part I cannot understand. Why did webdna fail to write to the db after each sequential tcp request? That's where my question about possible bugs comes from. > > I really don't understand why webdna failed to write to the db when I set the number of iterations to 10,000 and I cannot explain why the network activity continued (which means data was being received) but the database writing failed. This is the the mystery that bothers me more than anything else because it suggests a bigger underlying problem that may be unusually difficult to diagnose. > > No mistery here, this is just far away from the normal spectrum of internet use. Imagine that browsers limits simultaneous connections to 4 maxi, just to do not overload http servers. Here, you want to run an asp file 10,000 times opening 10,000 connections as fast as possible, it is normal that it just breaks. I bet a php program would quickly reach the same limit. I think your understand is wrong, and if not then mine is wrong. When I run a loop the way I did, I expect that only one iteration is performed at a time -- and only after one succeeds will the next one be performed. You're suggesting something very different: You're suggesting that all 10,000 iterations are going to be done simultaneously. I cannot understand how this can be possible. My understanding has always been that loops perform their tasks sequentially. If this is true it would be impossible for the second tcp request to begin before the first one ends, or the third to begin before the second one ends, etc. So ... is there something wrong with my understanding or yours? Sincerely, Kenneth Grome www.KenGrome.com 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:

Configuring E-mail (1997) [protect] error page (1997) AuthorizeNet setup -- progress but still need input from experts! (2000) Emailer problem....still (1997) Typhoon Rev. and PCS store problems (1999) Download Question (1997) Can you do this??? and other stuff (1997) RedHat 9 & WebCatalog 4.5 (2004) Merging databases (1997) Cart Number sequence (1997) [WebDNA] [OT] Google redirect or not (2014) Multiple security dbs (1997) Cookies (1999) HideIf ip= OR ip= (1998) bug in [SendMail] (1997) WebCat2b13MacPlugin - [math][date][/math] problem (1997) select multiple (1997) Webcatalog server support (1997) Viewing old carts (was FEW QUESTIONS) (1997) WC2b15 - [HTMLx]...[/HTMLx] problems (1997)