This is a migrated thread and some comments may be shown as answers.

Multiple Ajax Calls

4 Answers 178 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Andrew Buxton
Top achievements
Rank 1
Andrew Buxton asked on 13 Oct 2010, 09:39 AM
Hi,

I'm not sure if this is by design, or I'm missing a setting somewhere. However, I have a few ajax calls being made from the application front simultaneously and they are fine. However, the calls appear to be interupted whenever an ajax tooltip is activated. Are tooltips a special case?

Hope you can help,

Andy.

4 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 13 Oct 2010, 01:31 PM
Hello Andrew,

What control are you using for these multiple ajax calls? RadAjaxManager? If so, have you set RequestQueueSize to the amount of ajax requests you expect to run simultaneously.

Now about the ajax tooltip. I'm assuming this is using the RadToolTipManager. If so, perhaps since your RequestQueueSize wasn't set to a large enough amout, if you've set it, that it cancels the previous ajax call. Perhaps that is the problem. So I suggest to increase that property to accomodate all the ajax enabled controls you have to prevent them from cancelling an ajax request that is currently in progess.

I hope that helps.
0
Andrew Buxton
Top achievements
Rank 1
answered on 13 Oct 2010, 04:41 PM
Hi Cori,

I'm using two RadGrids side-by-side with a splitter (think of windows explorer), two toolbars and tooltips on the items in the radgrids. Along with an ajaxified checkbox in the left grid. The toolbars are updated depending on the currently selected items in the grids.

I am using the RadAjaxManager and the RadToolTipManager.

I tried your suggestion of setting the RequestQueueSize, but this resulted in server delivered unspecified errors and it ramped my IE memory usage up to 1.5 Gig! This was followed by an out of memory alert from the Ajax call. All fairly strange really. I tried this from two different PC's running the same version of browser IE8 (forced to run in IE7 compatibility mode) and got the same result.

I really don't know what's happening behind the scenes, but the tooltips seem to be the cause of the issue. If I remove the RequestQueueSize setting I stop receiving the errors, but again one call will be cancelled by another, in this instance (rolling over an item that fires a tooltip).

Not sure where I'm heading in terms of a soluition to this, but these Telerik controls have the QA department giving me some funny looks right now.

Hope you're able to add something extra here Cori,

Best,



Andy.
0
Iana Tsolova
Telerik team
answered on 18 Oct 2010, 11:30 AM
Hi Andrew,

Indeed, different browsers handle simultaneous ajax request different. However usually if a request starts before another request has finished, the first ajax request is being aborted. And this is how RadAjaxManager handles simultaneous requests, except the RequestQueueSize property is set to value greater than 0 (zero). But RadAjaxManager can manage its own request and the ajax request invoked by the RadToolTipManager is out of the RadAjaxManager control. So it is rather expected that the ToolTip ajax request invokes aborting of the RadAjaxManager request.
To overcome that issue, you can display loading panel over the whole page and thus prevent the user from invoking odd requests which can interrupt your logic.

All the best,
Iana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Andrew Buxton
Top achievements
Rank 1
answered on 02 Nov 2010, 12:48 PM
Hi Lana,

Just to complete this thread ...

I wasn't prepared to take the loading panel approach as this would impact usability of this particular application. I ran some tests setting the queue size and found that IE explodes in memory usage when this option is set.

In the end I decided to convert all the tooltips in the application to client-side tips. I added a tooltip control into the row template along with a container for the rich content that's hidden on load. I then dynamically inject the rich content using JavaScript. It works very well I must say.

I'm not entirely sure why the ajaxified tooltips are not managed by the AjaxManager, but I'm sure there's a good reason for it.

Many thanks for the help,

Regards,



Andy.
Tags
Ajax
Asked by
Andrew Buxton
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Andrew Buxton
Top achievements
Rank 1
Iana Tsolova
Telerik team
Share this question
or