PDA

View Full Version : AJAX request with long running server task



unlex
13 Jan 2010, 12:02 AM
Hi!
I have the following problem. I make an AJAX request to server with
Ext.Ajax.request or Ext.Panel.load with the 'timeout' option Number.MAX_VALUE and
if it takes server a lot of time to build response, client doesn't receive it.
In other words, for example, after 60 seconds server sends response, but request is still 'loading', doesn't receive anything and will be running until I stop server. But if response builds more quickly (1-20 sec) all's right.

What can be the solution?

unlex
13 Jan 2010, 1:46 AM
Problem solved by indicating timeout giving some exact number of ms, not by Number.MAX_VALUE.
I wonder why Number.MAX_VALUE causes such a type of problem, but however it works fine now.

Mike Robinson
13 Jan 2010, 7:15 AM
My guess is, "overflow."

You might want the request to wait for "hours," but it's not "waiting for Godot..." ~o)