Leo
Leo

Reputation: 139

Timeout in Ext Direct

I'm using Ext Direct to communicate with the server side. My server side takes more than 45 seconds to return all the data to extjs. I can see in the network ( in chrome browser ), that my request was cancelled since the operation took more than 30 seconds.

Where can i override this setting ?

Is it possible ?

Upvotes: 2

Views: 3217

Answers (3)

Emmanuel
Emmanuel

Reputation: 14209

I understand in Leo's answer that he suggests to edit directly ExtJS code, I don't think this is a good practice, all the more so as the parameter exists in the REMOTING_API:

Ext.app.REMOTING_API = {
    "url":"/usermanagement/extdirect/router",
    "actions":{"myService":[{"len":0,"name":"myMethod"}]},
    "type":"remoting",
    "timeout":120
};

Upvotes: 3

Leo
Leo

Reputation: 139

In your ext-all-debug.js,

under

Ext.define('Ext.data.Connection', { timeout:30000 

You can edit the timeout to a higher value, the default value is 30 seconds.

Upvotes: 1

sha
sha

Reputation: 17860

I'm pretty sure it's browser thing. It's not ExtJs breaking your connection attempt but the browser itself.

Update: I haven't tried using ExtDirect with huge data. And honestly speaking - you should not force your user to just wait on load such long time. It's very bad design. If you have something that takes that long - you need to provide some kind of feedback of the progress and break whole communication into smaller pieces.

Upvotes: 1

Related Questions