Home » HTML » HTML_AJAX » Bug #8345
request time limit
Details
| Submitted | 2006-08-02 10:38 UTC |
|---|---|
| From | piotr_wierzbowski at sevenet dot pl |
| Status | Bogus |
| Package | HTML_AJAX |
| PHP Version | 5.1.4 |
| Roadmaps | (Not assigned) |
Comments
[2006-08-02 10:38 UTC] piotr_wierzbowski at sevenet dot pl
Description:
------------
How can I set timeout limit for response ?
It is set to 20000ms (it's written in FF JavaConsole).
Aplication throws:
Błąd: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://medialider.svn/admin/class/admin_ajax.class.php?client=all&stub=rebuilderproductslinks :: anonymous :: line 1712" data: no]
Plik źródłowy: http://medialider.svn/admin/class/admin_ajax.class.php?client=all&stub=rebuilderproductslinks
Wiersz: 1712
In next line of console i have:
Błąd: Request Timed Out: time out was 20000ms
Plik źródłowy: http://medialider.svn/admin/class/admin_ajax.class.php?client=all&stub=rebuilderproductslinks
Wiersz: 1679
Translate to english:
Błąd = Error
Plik źródłowy = Source code
Wiersz = Line
Don't try to enter this pages - works olny localy
I tested spript and it need about 2 minutes :) in logs i see it runs to the end.
It's correct and gives right respons to browser (if i change data set to less -> works)
as a test script i paste 'stub' part of java script and linse witch caused error
Test script:
---------------
// Client stub for the RebuilderProductsLinks PHP Class
function RebuilderProductsLinks(callback) {
mode = 'sync';
if (callback) { mode = 'async'; }
this.className = 'RebuilderProductsLinks';
this.dispatcher = new HTML_AJAX_Dispatcher(this.className,mode,callback,'/admin/class/admin_ajax.class.php?','JSON');
}
RebuilderProductsLinks.prototype = {
Sync: function() { this.dispatcher.Sync(); },
Async: function(callback) { this.dispatcher.Async(callback); },
rebuildAllLinks: function() { return this.dispatcher.doCall('rebuildAllLinks',arguments); }
}
//-------------
1712: if (this.xmlhttp.status == 200)
1679: this._handleError(new Error('Request Timed Out: time out was '+this.request.timeout+'ms'));
[2006-08-09 05:42 UTC] jeichorn at php dot net
You can set the timeout by setting it on the Dispatcher object
stubInstance.dispatcher.timeout = 40000;