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 = 104444
interpreted = N
texte = On Jan 13, 2010, at 12:34, Kenneth Grome wrote: >> What about the [tcpconnect] outside the loop, and the [tcpsend]=20 >> inside? instead of opening 10,000 connections, it would just open = one? >=20 > I tried that too but I got no response at all using that approach. I = wish it had worked because it would have been a more efficient way to = collect the required data, assuming the server didn't terminate the = connection early because of so many similar requests. The only reason I = can think why this didn't work is that one of the tcpsends did not get a = response so all the others after that were not sent ... and perhaps this = prevented the tcpconnect from terminating ... ? 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. > Unfortunately this does not explain the lack of writing to the = database for the tcpsends that actually got a response, because the = replace context was inside the loop along with the tcpsend code. So I'm = thinking that there may be a memory leak or some other type of bug in = tcpconnect or tcpsend or loop that caused this particular problem. =20 >=20 > 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. - chris= 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)
On Jan 13, 2010, at 12:34, Kenneth Grome wrote: >> What about the [tcpconnect] outside the loop, and the [tcpsend]=20 >> inside? instead of opening 10,000 connections, it would just open = one? >=20 > I tried that too but I got no response at all using that approach. I = wish it had worked because it would have been a more efficient way to = collect the required data, assuming the server didn't terminate the = connection early because of so many similar requests. The only reason I = can think why this didn't work is that one of the tcpsends did not get a = response so all the others after that were not sent ... and perhaps this = prevented the tcpconnect from terminating ... ? 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. > Unfortunately this does not explain the lack of writing to the = database for the tcpsends that actually got a response, because the = replace context was inside the loop along with the tcpsend code. So I'm = thinking that there may be a memory leak or some other type of bug in = tcpconnect or tcpsend or loop that caused this particular problem. =20 >=20 > 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. - chris= christophe.billiottet@webdna.us

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:

[math] are you there? (1999) problem serving foreign languages text (1997) The Send Mail Button is the Best Troubleshooter (1998) cart info (1998) To do multiple appends with single submit (2002) WC2f3 (1997) GuestBook example (1997) emailer 150 (1997) Sorting by date (1997) Part Html part WebDNA (1997) Digest Version (2000) mac hack (1997) HELP WITH DATES (1997) Setting up shop (1997) WebCatalog-NT?'s (1996) Quit revisited (1997) Execute Applescript (1997) off topic - dna snipets (1997) My slower response (1997) Shared conversion under WebTen (1998)