PDA

View Full Version : timeout > 30



andreyz
6 Aug 2007, 10:09 PM
Here is such problem:
request is executed more than 30 seconds and nothing be not displayed as timeout to do more than 30 seconds?


var ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({
url: 'ajax_out_customers.php?sel_sessions=1&cust_m='+cust_id
}),

reader: new Ext.data.JsonReader({
root: 'results',
totalProperty: 'total',
id: 'SESS_ID'

}, [
{name: 'SESS_ID', mapping: 'SESS_ID', type: 'int'},
{name: 'START_DATE', mapping: 'START_DATE', type: 'date', dateFormat: 'd.m.Y H:i:s'},
{name: 'END_DATE', mapping: 'END_DATE', type: 'date', dateFormat: 'd.m.Y H:i:s'}
]),
// turn on remote sorting
remoteSort: true
});

var cm = new Ext.grid.ColumnModel([
{
id: 'SESS_ID',
header: "SESS_ID",
width: 1,
hidden: true
},
{
header: "Начало сесии",
dataIndex: 'START_DATE',
width: 150,
renderer: Ext.util.Format.dateRenderer('d.m.Y H:i:s')
},{

header: "Окончание сесии",
dataIndex: 'END_DATE',
width: 150,
renderer: Ext.util.Format.dateRenderer('d.m.Y H:i:s')
}
]);
cm.defaultSortable = true;

var grid = new Ext.grid.Grid('grid-paging', {
ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
enableColLock:false,
loadMask: true
});

grid.render();

var gridFoot = grid.getView().getFooterPanel(true);

// add a paging toolbar to the grid's footer
var paging = new Ext.PagingToolbar(gridFoot, ds, {
pageSize: 20,
displayInfo: true,
displayMsg: 'Выбрано строк {0} - {1} of {2}',
emptyMsg: "No topics to display"
});

ds.load({params:{start:0, limit:20}});

tryanDLS
7 Aug 2007, 8:22 AM
Are you saying you need to increase the timeout? If so, you should be able to pass a timeout config to the proxy.

AlexJG
7 Aug 2007, 1:38 PM
Do you mean php timeout? If so then ....

30 seconds is a long time for a script to be running so first I would check what the script is doing.

If you really need to increase the php timeout use set_time_limit in PHP

Alex

andreyz
9 Aug 2007, 11:10 PM
Are you saying you need to increase the timeout? If so, you should be able to pass a timeout config to the proxy.

As this do? This not restriction PHP.

andreyz
28 Aug 2007, 1:21 AM
HELP!!!

Animal
28 Aug 2007, 3:16 AM
You've been helped. tryanDLS explained what to do, you should now look at the docs.

HttpProxy constructor accepts a Connection:

http://extjs.com/deploy/ext/docs/output/Ext.data.HttpProxy.html

Connection has configurable timeout:

http://extjs.com/deploy/ext/docs/output/Ext.data.Connection.html#config-timeout

atdc12
14 Sep 2007, 5:34 AM
This morning I tried to set the timeout to zero (0), I assume this would mean unlimited timeout isnt it?

I did that because I'm calling a method which takes about 1-10 minutes to finish, is it wise to allow unlimited timeout? Or is there any better way to do this?

Thanks