Hello, I am new to the list. I am currently using prototype.js version 1.4.0, for an application we are developing to be used with IE6&7. I am having a problem which can be triggered as so: 1) Open Window with 10 Ajax Request connections starting on Load 2) Right after the page loads (and you feel like the Ajax Requests have been triggered) close the window 3) Repeat steps 1 & 2 about 3~4 times 4) All other Ajax Requests within IE session will not work (I used a network scanner to sniff the packets on my network and see that the Ajax Requests are not even sending a request) The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is not really an option as we have found other problem in 1.5.0 which break under IE7. The problem seams to be a "connection leak" or "dangling connection" problem in IE (connections are not being closed correctly and IE thinks that they are still open). Has anyone seen a problem like that? Does anyone have an idea where I can look? Possible work around (Setting a reg key to increase the number of allowed connections in IE (even if it''s just a not very robust workaround)) ? Any help would be appreciated. Thank you for your time --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
1.4.0 is quite old by this point. I don''t know if 1.5.0 would fix your problem but you might want to cook up a test to see. Either way it is probably worth it to update your code every once in a while just to eliminate a few variables when bringing up questions like this. If you can eliminate (or reduce) ajax requests on load your page will be much faster and much less problematic. I have no idea how your server-side code works but would it be possible to generate a script tag at the end of the page that calls your onCompletes or whatever directly without initiating an Ajax request? I did some shallow research and it appears there is an abort method for xmlhttprequest, and Prototype never calls it under any circumstance.. Maybe Prototype should cache all active requests and on unload it should call abort on any active requests? It sounds like that may be a possible fix to your problem. Cook up a simple test and see if it does. If this fixes your problem I think it is definitely worthy of a ptach, but good luck getting it accepted if you write it yourself and pass it off as your own idea ;) You could probably implement a wrapper yourself easily enough as an alternative... If calling abort does fix the problem, bring this up in the Prototype Core group for further discussion of a patch. If you write a patch, consider writing it for the new ajax branch recently opened: http://groups.google.com/group/prototype-core/browse_frm/thread/43c13d4b233b20fb Colin szaroubi wrote:> Hello, > I am new to the list. I am currently using prototype.js version > 1.4.0, for an application we are developing to be used with IE6&7. > I am having a problem which can be triggered as so: > > 1) Open Window with 10 Ajax Request connections starting on Load > 2) Right after the page loads (and you feel like the Ajax Requests > have been triggered) close the window > 3) Repeat steps 1 & 2 about 3~4 times > 4) All other Ajax Requests within IE session will not work (I used > a network scanner to sniff the packets on my network and see that the > Ajax Requests are not even sending a request) > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > not really an option as we have found other problem in 1.5.0 which > break under IE7. > The problem seams to be a "connection leak" or "dangling > connection" problem in IE (connections are not being closed correctly > and IE thinks that they are still open). > > Has anyone seen a problem like that? Does anyone have an idea where > I can look? Possible work around (Setting a reg key to increase the > number of allowed connections in IE (even if it''s just a not very > robust workaround)) ? > > Any help would be appreciated. > Thank you for your time > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Colin, Thank you for your reply and ideas. I have testing with 1.5.0 on IE6 (Cause 1.5.0 && ie7 seam to have problems with each other), and the problem is still there. Actually the Ajax.Requests are created and called in a script tag at the end of the body. On Feb 28, 11:13 am, Colin Mollenhour <eliteii...-NPSFNn/7+NYVo650/ln6uw@public.gmane.org> wrote:> 1.4.0 is quite old by this point. I don''t know if 1.5.0 would fix your > problem but you might want to cook up a test to see. Either way it is > probably worth it to update your code every once in a while just to > eliminate a few variables when bringing up questions like this. > > If you can eliminate (or reduce) ajax requests on load your page will be > much faster and much less problematic. I have no idea how your > server-side code works but would it be possible to generate a script tag > at the end of the page that calls your onCompletes or whatever directly > without initiating an Ajax request? > > I did some shallow research and it appears there is an abort method for > xmlhttprequest, and Prototype never calls it under any circumstance.. > Maybe Prototype should cache all active requests and on unload it should > call abort on any active requests? It sounds like that may be a possible > fix to your problem. Cook up a simple test and see if it does. If this > fixes your problem I think it is definitely worthy of a ptach, but good > luck getting it accepted if you write it yourself and pass it off as > your own idea ;) You could probably implement a wrapper yourself easily > enough as an alternative... > > If calling abort does fix the problem, bring this up in the Prototype > Core group for further discussion of a patch. If you write a patch, > consider writing it for the new ajax branch recently opened:http://groups.google.com/group/prototype-core/browse_frm/thread/43c13... > > Colin > > szaroubi wrote: > > Hello, > > I am new to the list. I am currently using prototype.js version > > 1.4.0, for an application we are developing to be used with IE6&7. > > I am having a problem which can be triggered as so: > > > 1) Open Window with 10 Ajax Request connections starting on Load > > 2) Right after the page loads (and you feel like the Ajax Requests > > have been triggered) close the window > > 3) Repeat steps 1 & 2 about 3~4 times > > 4) All other Ajax Requests within IE session will not work (I used > > a network scanner to sniff the packets on my network and see that the > > Ajax Requests are not even sending a request) > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > > not really an option as we have found other problem in 1.5.0 which > > break under IE7. > > The problem seams to be a "connection leak" or "dangling > > connection" problem in IE (connections are not being closed correctly > > and IE thinks that they are still open). > > > Has anyone seen a problem like that? Does anyone have an idea where > > I can look? Possible work around (Setting a reg key to increase the > > number of allowed connections in IE (even if it''s just a not very > > robust workaround)) ? > > > Any help would be appreciated. > > Thank you for your time--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Ok, I got curious and worked up a test to make sure the abort method worked.. It does, but it''s behavior is different in every browser I''ve tried which is IE6, IE7, FF2 and Opera 9.1. Please try this page in any other browsers that you have access to and let me know how it works, specifically Safari. Also, I probably need to play with timeouts or loops to check the status to see how aborting works at different stages of the request but I hav ea feeling it''ll work the same for all. http://colin.mollenhour.com/ajaxtest.php I think it would be quite possible to add an abort method to Prototype''s Ajax classes. So far, I think all that is really needed to make it work consistently cross browser is something like the following: req.onreadystatechange = function () { debug(''readyState (''+req.readyState+'')''); if(req.readyState != 4){ return; } try{ if(req.status == 0){ debug(''aborted with status == 0''); return; } }catch(ex){ debug(''aborted on exception checking status''); return; } callback(req); } I imagine aborting all of your outstanding Ajax requests on unload would fix your problem. You can use my page as a base for devising your own tests to that purpose and let us know how it goes. Thanks, Colin szaroubi wrote:> Hello, > I am new to the list. I am currently using prototype.js version > 1.4.0, for an application we are developing to be used with IE6&7. > I am having a problem which can be triggered as so: > > 1) Open Window with 10 Ajax Request connections starting on Load > 2) Right after the page loads (and you feel like the Ajax Requests > have been triggered) close the window > 3) Repeat steps 1 & 2 about 3~4 times > 4) All other Ajax Requests within IE session will not work (I used > a network scanner to sniff the packets on my network and see that the > Ajax Requests are not even sending a request) > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > not really an option as we have found other problem in 1.5.0 which > break under IE7. > The problem seams to be a "connection leak" or "dangling > connection" problem in IE (connections are not being closed correctly > and IE thinks that they are still open). > > Has anyone seen a problem like that? Does anyone have an idea where > I can look? Possible work around (Setting a reg key to increase the > number of allowed connections in IE (even if it''s just a not very > robust workaround)) ? > > Any help would be appreciated. > Thank you for your time > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hi IE limits concurrent requests to 2 simultaneously. You could try using seperate subdomains or moving some of your requests to IP addresses that are the same as the domain your webserver. Then retest and see if you get the prob. If you are shutting IE down, and the problem still persists then it indicates its something higher up. You could also try checking task manager to ensure the IE instances have closed properly before you restart. Gareth On 3/1/07, szaroubi <szaroubi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hello, > I am new to the list. I am currently using prototype.js version > 1.4.0, for an application we are developing to be used with IE6&7. > I am having a problem which can be triggered as so: > > 1) Open Window with 10 Ajax Request connections starting on Load > 2) Right after the page loads (and you feel like the Ajax Requests > have been triggered) close the window > 3) Repeat steps 1 & 2 about 3~4 times > 4) All other Ajax Requests within IE session will not work (I used > a network scanner to sniff the packets on my network and see that the > Ajax Requests are not even sending a request) > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > not really an option as we have found other problem in 1.5.0 which > break under IE7. > The problem seams to be a "connection leak" or "dangling > connection" problem in IE (connections are not being closed correctly > and IE thinks that they are still open). > > Has anyone seen a problem like that? Does anyone have an idea where > I can look? Possible work around (Setting a reg key to increase the > number of allowed connections in IE (even if it''s just a not very > robust workaround)) ? > > Any help would be appreciated. > Thank you for your time > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry, the gist of that was that IE might think the ajax requests are still open, thus the rest of the calls will queue up. you''ll also find your home page loads much faster using multiple domains as you can load Subdomains / 2 at a time giving a speed increase of Queries * Subdomains/2. :P On 3/1/07, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi > > IE limits concurrent requests to 2 simultaneously. > You could try using seperate subdomains or moving some of your requests to > IP addresses that are the same as the domain your webserver. > Then retest and see if you get the prob. If you are shutting IE down, and > the problem still persists then it indicates its something higher up. > You could also try checking task manager to ensure the IE instances have > closed properly before you restart. > > Gareth > > > On 3/1/07, szaroubi <szaroubi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hello, > > I am new to the list. I am currently using prototype.js version > > 1.4.0, for an application we are developing to be used with IE6&7. > > I am having a problem which can be triggered as so: > > > > 1) Open Window with 10 Ajax Request connections starting on Load > > 2) Right after the page loads (and you feel like the Ajax Requests > > have been triggered) close the window > > 3) Repeat steps 1 & 2 about 3~4 times > > 4) All other Ajax Requests within IE session will not work (I used > > a network scanner to sniff the packets on my network and see that the > > Ajax Requests are not even sending a request) > > > > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > > not really an option as we have found other problem in 1.5.0 which > > break under IE7. > > The problem seams to be a "connection leak" or "dangling > > connection" problem in IE (connections are not being closed correctly > > and IE thinks that they are still open). > > > > Has anyone seen a problem like that? Does anyone have an idea where > > I can look? Possible work around (Setting a reg key to increase the > > number of allowed connections in IE (even if it''s just a not very > > robust workaround)) ? > > > > Any help would be appreciated. > > Thank you for your time > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
> -----Original Message----- > From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails- > spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Gareth Evans > Sent: Thursday, March 01, 2007 3:03 AM > To: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > Subject: [Rails-spinoffs] Re: Ajax Requests Handing after window close > > Hi > > IE limits concurrent requests to 2 simultaneously. > You could try using seperate subdomains or moving some of your requests to > IP addresses that are the same as the domain your webserver. > Then retest and see if you get the prob. If you are shutting IE down, and > the problem still persists then it indicates its something higher up. > You could also try checking task manager to ensure the IE instances have > closed properly before you restart. > > Gareth > > > On 3/1/07, szaroubi <szaroubi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, > I am new to the list. I am currently using prototype.js version > 1.4.0, for an application we are developing to be used with IE6&7. > I am having a problem which can be triggered as so: > > 1) Open Window with 10 Ajax Request connections starting on Load > 2) Right after the page loads (and you feel like the Ajax Requests > have been triggered) close the window > 3) Repeat steps 1 & 2 about 3~4 times > 4) All other Ajax Requests within IE session will not work (I used > a network scanner to sniff the packets on my network and see that > the > Ajax Requests are not even sending a request) > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > not really an option as we have found other problem in 1.5.0 which > break under IE7. > The problem seams to be a "connection leak" or "dangling > connection" problem in IE (connections are not being closed > correctly > and IE thinks that they are still open). > > Has anyone seen a problem like that? Does anyone have an idea > where > I can look? Possible work around (Setting a reg key to increase the > number of allowed connections in IE (even if it''s just a not very > robust workaround)) ? > > Any help would be appreciated. > Thank you for your time > > > > > >Gareth, After having another programmer in the company start attacking the problem with a fresh set of eyes, he had come to the same conclusion as you. So the problem seams to be the limit in IE on the number of connections per host. He also found a registry key that would increase the number 2 to what ever you which. Seeing that we are running our application in an Intranet environment and we have total control over the client machines, therefore we can install these registry keys. I understand that this is not a viable solution for people running this in an Internet context where they don''t have access to client machines. I just wanted to post the reg files that we used to fix the problem hoping it might be useful for others. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
The actual solution would be to properly abort/close down your requests- I suspect they are getting orphaned when you close the window. The 2 concurrent request is as-per-HTTP spec. Whether the browser actually adheres to this, is a different story all together. For once, IE is spec compliant! Gareth On 3/2/07, Sherif Zaroubi <szaroubi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > > -----Original Message----- > > From: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails- > > spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Gareth Evans > > Sent: Thursday, March 01, 2007 3:03 AM > > To: rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > Subject: [Rails-spinoffs] Re: Ajax Requests Handing after window close > > > > Hi > > > > IE limits concurrent requests to 2 simultaneously. > > You could try using seperate subdomains or moving some of your requests > to > > IP addresses that are the same as the domain your webserver. > > Then retest and see if you get the prob. If you are shutting IE down, > and > > the problem still persists then it indicates its something higher up. > > You could also try checking task manager to ensure the IE instances have > > closed properly before you restart. > > > > Gareth > > > > > > On 3/1/07, szaroubi <szaroubi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hello, > > I am new to the list. I am currently using prototype.js version > > 1.4.0, for an application we are developing to be used with IE6&7. > > I am having a problem which can be triggered as so: > > > > 1) Open Window with 10 Ajax Request connections starting on Load > > 2) Right after the page loads (and you feel like the Ajax > Requests > > have been triggered) close the window > > 3) Repeat steps 1 & 2 about 3~4 times > > 4) All other Ajax Requests within IE session will not work (I > used > > a network scanner to sniff the packets on my network and see that > > the > > Ajax Requests are not even sending a request) > > > > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > > not really an option as we have found other problem in 1.5.0 which > > break under IE7. > > The problem seams to be a "connection leak" or "dangling > > connection" problem in IE (connections are not being closed > > correctly > > and IE thinks that they are still open). > > > > Has anyone seen a problem like that? Does anyone have an idea > > where > > I can look? Possible work around (Setting a reg key to increase > the > > number of allowed connections in IE (even if it''s just a not very > > robust workaround)) ? > > > > Any help would be appreciated. > > Thank you for your time > > > > > > > > > > > > > Gareth, > After having another programmer in the company start attacking the > problem with a fresh set of eyes, he had come to the same conclusion as > you. > > So the problem seams to be the limit in IE on the number of > connections per host. He also found a registry key that would increase the > number 2 to what ever you which. > Seeing that we are running our application in an Intranet > environment and we have total control over the client machines, therefore > we > can install these registry keys. I understand that this is not a viable > solution for people running this in an Internet context where they don''t > have access to client machines. > I just wanted to post the reg files that we used to fix the problem > hoping it might be useful for others. > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---