Ext. ajax. timeout
The company has a small product that uses ext's ajax function. Later, when the data volume is large, query timeout is always reported. After analysis, it is caused by the default timeout setting. Later, it adds a sentence to the jsp page.
Ext. Ajax. timeout = 900000; (timeout is 15 minutes, in milliseconds. The default value is 30 seconds)
Done. References
The use of Ext for R & D will inevitably involve the data communication problem between the front-end and the back-end, that is, the data is usually obtained from the back-end; there will be a problem of time in this process, that is, it is impossible for the front-end to wait there. I don't expect such a problem at ordinary times, but the recent projects only suffer from thinking and the amount of data is too large, the total number of data records for a single query takes more than one minute (the total number of data records in the table is more than 60 million). The backend does not finish the query, and the front-end prompts that the query times out. After checking a lot of data, the process is completed;
Method:
Add a sentence to the page:
Ext. Ajax. timeout = 900000; (timeout is 15 minutes, in milliseconds. The default value is 30 seconds)
Ext. Ajax. request example
Ext. messageBox. confirm ('prompt information', info, function (btn) {if (btn = 'yes') {Ext. ajax. request ({url :'.. /delCompanyById. do ', params: {companyId: sendCompanyId}, success: function (response, options) {// Ext. util. JSON. decode (response. responseText); var jsonObj = Ext. util. JSON. decode (response. responseText); alert ("result is -----" + jsonObj. message); companyStore. load () ;}, failure: function (response, ooptions) {// Ext. util. JSON. decode (response. responseText); var jsonObj = Ext. util. JSON. decode (response. responseText); alert ("result is -----" + jsonObj. message );}});